Skip to content

Commit

Permalink
feat: Disable Express eTag response header for consistent FF behaviou…
Browse files Browse the repository at this point in the history
…r across FF runtimes (#439)

* Revert "Revert "Disable Express eTag response header for consistent FF behaviour across FF runtimes  (#433)" (#438)"

This reverts commit 957320b.

* lint: update newlines
  • Loading branch information
grant committed Mar 31, 2022
1 parent 451723b commit 07668f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ export function getServer(
// Subsequent parsers will be skipped when one is matched.
app.use(bodyParser.raw(rawBodySavingOptions));
app.enable('trust proxy'); // To respect X-Forwarded-For header.

// Disable Express 'x-powered-by' header:
// http://expressjs.com/en/advanced/best-practice-security.html#at-a-minimum-disable-x-powered-by-header
app.disable('x-powered-by');

// Disable Express eTag response header
app.disable('etag');

if (
functionSignatureType === 'event' ||
functionSignatureType === 'cloudevent'
Expand Down

0 comments on commit 07668f6

Please sign in to comment.