1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-10 01:16:39 +02:00

fix: add 'Vary: Origin' header to cors response

This commit is contained in:
Ivar Conradi Østhus 2023-12-12 08:05:32 +01:00
parent 7d40ded3c3
commit abf540a1cc
No known key found for this signature in database
GPG Key ID: 14F51E4841AF1DE1
2 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ export const conditionalMiddleware = (
const router = Router(); const router = Router();
router.use((req, res, next) => { router.use((req, res, next) => {
res.setHeader('Vary', 'Origin');
if (condition()) { if (condition()) {
middleware(req, res, next); middleware(req, res, next);
} else { } else {

View File

@ -76,6 +76,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => {
}, },
}, },
crossOriginEmbedderPolicy: false, crossOriginEmbedderPolicy: false,
originAgentCluster: false,
}); });
} }
return (req, res, next) => { return (req, res, next) => {