1
0
Fork 0

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.ts
This commit is contained in:
Lucien A 2020-03-11 08:46:03 +01:00 committed by GitHub
parent 03efb1419d
commit 9878d1ac63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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