feat: add cors on production

This commit is contained in:
Valentin Kaelin 2020-10-17 15:43:29 +02:00
parent 581ce52871
commit 324d4d539f

View file

@ -44,7 +44,17 @@ const corsConfig: CorsConfig = {
| one of the above values.
|
*/
origin: true,
origin: (origin) => {
if (process.env.NODE_ENV === 'development') {
return true
}
if (origin.includes('leaguestats.gg')) {
return true
}
return false
},
/*
|--------------------------------------------------------------------------