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
pull/2538/head
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
1 changed files with 3 additions and 0 deletions

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