mirror of https://github.com/Chocobozzz/PeerTube
Fix CSP issue on WebFinger service (#2541)
* Fix CSP issue on WebFinger service WebFinger RFC states that CSP should allow any origin to access WebFinger resources. * Update webfinger.tspull/2538/head
parent
03efb1419d
commit
9878d1ac63
|
@ -1,9 +1,12 @@
|
|||
import * as cors from 'cors'
|
||||
import * as express from 'express'
|
||||
import { asyncMiddleware } from '../middlewares'
|
||||
import { webfingerValidator } from '../middlewares/validators'
|
||||
|
||||
const webfingerRouter = express.Router()
|
||||
|
||||
webfingerRouter.use(cors())
|
||||
|
||||
webfingerRouter.get('/.well-known/webfinger',
|
||||
asyncMiddleware(webfingerValidator),
|
||||
webfingerController
|
||||
|
|
Loading…
Reference in New Issue