From 898d4dbe4fa9e0ff0d7ab5cec4932f80c5ffd81a Mon Sep 17 00:00:00 2001 From: Gitar Date: Wed, 18 Sep 2024 03:21:48 +0000 Subject: [PATCH] [DJ] [Gitar] Updating TypeScript files --- src/lib/middleware/secure-headers.ts | 5 ----- src/lib/types/experimental.ts | 1 - src/server-dev.ts | 1 - 3 files changed, 7 deletions(-) diff --git a/src/lib/middleware/secure-headers.ts b/src/lib/middleware/secure-headers.ts index 5eaa8926f3f3..deb842a359e4 100644 --- a/src/lib/middleware/secure-headers.ts +++ b/src/lib/middleware/secure-headers.ts @@ -125,11 +125,6 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => { return (req, res, next) => { if (req.method === 'OPTIONS') { return next(); - } else if ( - req.path.startsWith(`${config.server.baseUriPath}/api/`) && - config.flagResolver.isEnabled('stripHeadersOnAPI') - ) { - apiHelmet(req, res, next); } else { defaultHelmet(req, res, next); } diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 09e56e2bc3eb..d64e6e3facdc 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -25,7 +25,6 @@ export type IFlagKey = | 'advancedPlayground' | 'filterInvalidClientMetrics' | 'disableMetrics' - | 'stripHeadersOnAPI' | 'signals' | 'automatedActions' | 'celebrateUnleash' diff --git a/src/server-dev.ts b/src/server-dev.ts index be7e586391db..e0037f127f3b 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -40,7 +40,6 @@ process.nextTick(async () => { embedProxyFrontend: true, anonymiseEventLog: false, responseTimeWithAppNameKillSwitch: false, - stripHeadersOnAPI: true, celebrateUnleash: true, featureSearchFeedbackPosting: true, userAccessUIEnabled: true,