diff --git a/src/server.ts b/src/server.ts index 399becc1..ec3cff91 100644 --- a/src/server.ts +++ b/src/server.ts @@ -108,7 +108,7 @@ export function getServer( app.disable('x-powered-by'); // Disable Express eTag response header - app.disable('etag'); + app.set('etag', false); if ( functionSignatureType === 'event' || diff --git a/test/integration/http.ts b/test/integration/http.ts index f38c1dfb..9f8badcf 100644 --- a/test/integration/http.ts +++ b/test/integration/http.ts @@ -105,7 +105,8 @@ describe('HTTP Function', () => { ) .set('Content-Type', 'application/json') .expect(test.expectedBody) - .expect(test.expectedStatus); + .expect(test.expectedStatus) + .expect(res => assert(!res.get('etag'))); assert.strictEqual(callCount, test.expectedCallCount); }); });