mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
feat: add cors on production
This commit is contained in:
parent
581ce52871
commit
324d4d539f
1 changed files with 11 additions and 1 deletions
|
|
@ -44,7 +44,17 @@ const corsConfig: CorsConfig = {
|
||||||
| one of the above values.
|
| 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
|
||||||
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue