From 6d2b882eb8cdc63bb95f405788b12ce33eafc895 Mon Sep 17 00:00:00 2001 From: "gitar-bot[bot]" <159877585+gitar-bot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 09:30:32 +0200 Subject: [PATCH] [Gitar] Cleaning up stale flag: stripHeadersOnAPI with value true (#8457) [![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co) --- This automated PR was generated by [Gitar](https://gitar.co). View [docs](https://gitar.co/docs). Co-authored-by: Gitar --- src/lib/middleware/secure-headers.ts | 3 +-- src/lib/types/experimental.ts | 1 - src/server-dev.ts | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/middleware/secure-headers.ts b/src/lib/middleware/secure-headers.ts index 5eaa8926f3..98323dfbe5 100644 --- a/src/lib/middleware/secure-headers.ts +++ b/src/lib/middleware/secure-headers.ts @@ -126,8 +126,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => { if (req.method === 'OPTIONS') { return next(); } else if ( - req.path.startsWith(`${config.server.baseUriPath}/api/`) && - config.flagResolver.isEnabled('stripHeadersOnAPI') + req.path.startsWith(`${config.server.baseUriPath}/api/`) ) { apiHelmet(req, res, next); } else { diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 4ea7e2369e..d1b77a8832 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 e38f98ee78..bd52ea379c 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,