move CORS allowance to the REST API router
This commit is contained in:
parent
b229e38d50
commit
12daa83784
2 changed files with 24 additions and 15 deletions
|
@ -8,9 +8,16 @@ import { accountsRouter } from './accounts'
|
|||
import { videosRouter } from './videos'
|
||||
import { badRequest } from '../../helpers/express-utils'
|
||||
import { videoChannelRouter } from './video-channel'
|
||||
import * as cors from 'cors'
|
||||
|
||||
const apiRouter = express.Router()
|
||||
|
||||
apiRouter.use(cors({
|
||||
origin: '*',
|
||||
exposedHeaders: 'Retry-After',
|
||||
credentials: true
|
||||
}))
|
||||
|
||||
apiRouter.use('/server', serverRouter)
|
||||
apiRouter.use('/oauth-clients', oauthClientsRouter)
|
||||
apiRouter.use('/config', configRouter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue