diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/index.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/controllers/api/index.ts b/server/controllers/api/index.ts index 8f63b9535..c386a6710 100644 --- a/server/controllers/api/index.ts +++ b/server/controllers/api/index.ts | |||
@@ -8,9 +8,16 @@ import { accountsRouter } from './accounts' | |||
8 | import { videosRouter } from './videos' | 8 | import { videosRouter } from './videos' |
9 | import { badRequest } from '../../helpers/express-utils' | 9 | import { badRequest } from '../../helpers/express-utils' |
10 | import { videoChannelRouter } from './video-channel' | 10 | import { videoChannelRouter } from './video-channel' |
11 | import * as cors from 'cors' | ||
11 | 12 | ||
12 | const apiRouter = express.Router() | 13 | const apiRouter = express.Router() |
13 | 14 | ||
15 | apiRouter.use(cors({ | ||
16 | origin: '*', | ||
17 | exposedHeaders: 'Retry-After', | ||
18 | credentials: true | ||
19 | })) | ||
20 | |||
14 | apiRouter.use('/server', serverRouter) | 21 | apiRouter.use('/server', serverRouter) |
15 | apiRouter.use('/oauth-clients', oauthClientsRouter) | 22 | apiRouter.use('/oauth-clients', oauthClientsRouter) |
16 | apiRouter.use('/config', configRouter) | 23 | apiRouter.use('/config', configRouter) |