This commit is contained in:
Norbert de Langen 2022-12-07 14:20:07 +01:00
parent ea26a0031b
commit 48789b18b3
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762

View File

@ -1,4 +1,6 @@
export function getAccessControlMiddleware(crossOriginIsolated: boolean) {
import type { RequestHandler } from 'express';
export function getAccessControlMiddleware(crossOriginIsolated: boolean): RequestHandler {
return (req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');