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:
parent
7d40ded3c3
commit
abf540a1cc
@ -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 {
|
||||
|
@ -76,6 +76,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => {
|
||||
},
|
||||
},
|
||||
crossOriginEmbedderPolicy: false,
|
||||
originAgentCluster: false,
|
||||
});
|
||||
}
|
||||
return (req, res, next) => {
|
||||
|
Loading…
Reference in New Issue
Block a user