Do not enable cors twice on /api in test mode
This commit is contained in:
parent
12daa83784
commit
3ff5a19b4c
|
@ -90,7 +90,8 @@ if (isTestInstance()) {
|
||||||
// These routes have already cors
|
// These routes have already cors
|
||||||
if (
|
if (
|
||||||
req.path.indexOf(STATIC_PATHS.TORRENTS) === -1 &&
|
req.path.indexOf(STATIC_PATHS.TORRENTS) === -1 &&
|
||||||
req.path.indexOf(STATIC_PATHS.WEBSEED) === -1
|
req.path.indexOf(STATIC_PATHS.WEBSEED) === -1 &&
|
||||||
|
req.path.startsWith('/api/') === false
|
||||||
) {
|
) {
|
||||||
return (cors({
|
return (cors({
|
||||||
origin: '*',
|
origin: '*',
|
||||||
|
|
Loading…
Reference in New Issue