aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-29 09:48:19 +0200
committerChocobozzz <me@florianbigard.com>2018-06-29 09:48:19 +0200
commit3ff5a19b4c988d6c712b7ce63c4cf04f99d047ce (patch)
treeae0b68e51520768df824a242d2986f4e5fb436f5 /server.ts
parent12daa83784ea112e33d3b8b590a805dae9a29c1c (diff)
downloadPeerTube-3ff5a19b4c988d6c712b7ce63c4cf04f99d047ce.tar.gz
PeerTube-3ff5a19b4c988d6c712b7ce63c4cf04f99d047ce.tar.zst
PeerTube-3ff5a19b4c988d6c712b7ce63c4cf04f99d047ce.zip
Do not enable cors twice on /api in test mode
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server.ts b/server.ts
index 5511c5435..fffb8038f 100644
--- a/server.ts
+++ b/server.ts
@@ -90,7 +90,8 @@ if (isTestInstance()) {
90 // These routes have already cors 90 // These routes have already cors
91 if ( 91 if (
92 req.path.indexOf(STATIC_PATHS.TORRENTS) === -1 && 92 req.path.indexOf(STATIC_PATHS.TORRENTS) === -1 &&
93 req.path.indexOf(STATIC_PATHS.WEBSEED) === -1 93 req.path.indexOf(STATIC_PATHS.WEBSEED) === -1 &&
94 req.path.startsWith('/api/') === false
94 ) { 95 ) {
95 return (cors({ 96 return (cors({
96 origin: '*', 97 origin: '*',