fix(allowed origin): add pre-assigned nelify address url to allowed origin list for test deployment rundown

This commit is contained in:
Anda Toshiki 2024-05-09 01:40:53 -07:00
parent d840674d2a
commit a7a1c884b2

View File

@ -23,6 +23,13 @@ const handler: Handler = async () => {
// Origin for CORS
const origin = process.env.NODE_ENV === 'production' ? 'https://toshiki.dev' : 'http://localhost:3000'
const allowedOrigins = ['https://toshiki.dev', 'http://localhost:3000', 'https://toshiki-home-nuxt3.netlify.app/']
if (!allowedOrigins.includes(origin)) {
return {
statusCode: 403,
body: 'Forbidden'
}
}
// Map track function
const mapTrack = (track: any): any => {