Do not enable cors twice on /api in test mode

pull/753/head
Chocobozzz 2018-06-29 09:48:19 +02:00
parent 12daa83784
commit 3ff5a19b4c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 1 deletions

View File

@ -90,7 +90,8 @@ if (isTestInstance()) {
// These routes have already cors
if (
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({
origin: '*',