1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01: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();
router.use((req, res, next) => {
res.setHeader('Vary', 'Origin');
if (condition()) {
middleware(req, res, next);
} else {

View File

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