diff --git a/src/lib/middleware/conditional-middleware.ts b/src/lib/middleware/conditional-middleware.ts index c548618c20..3a5eb4a249 100644 --- a/src/lib/middleware/conditional-middleware.ts +++ b/src/lib/middleware/conditional-middleware.ts @@ -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 { diff --git a/src/lib/middleware/secure-headers.ts b/src/lib/middleware/secure-headers.ts index efa6245498..2c5cbfe309 100644 --- a/src/lib/middleware/secure-headers.ts +++ b/src/lib/middleware/secure-headers.ts @@ -76,6 +76,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => { }, }, crossOriginEmbedderPolicy: false, + originAgentCluster: false, }); } return (req, res, next) => {