From 7f29eae2b35f109c8d2a43f53747e1bfa399758b Mon Sep 17 00:00:00 2001 From: Toby Cox Date: Fri, 10 May 2024 13:59:43 +0100 Subject: [PATCH] FIX: case sesnsitive check (#11616) * FIX: case sesnsitive check * FIX: test case --- src/server/index.jsx | 2 +- src/server/index.test.jsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/index.jsx b/src/server/index.jsx index f87989a1fd3..5adbb6ad40a 100644 --- a/src/server/index.jsx +++ b/src/server/index.jsx @@ -341,7 +341,7 @@ server.get( `https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion${urlPath}`, ); - const allVaryHeaders = ['X-country']; + const allVaryHeaders = ['X-Country']; const mvtVaryHeaders = !isAmp && getMvtVaryHeaders(mvtExperiments); if (mvtVaryHeaders) allVaryHeaders.push(mvtVaryHeaders); diff --git a/src/server/index.test.jsx b/src/server/index.test.jsx index 1f40db348c2..682b9d7be5a 100644 --- a/src/server/index.test.jsx +++ b/src/server/index.test.jsx @@ -1465,7 +1465,7 @@ describe('Server HTTP Headers - Page Endpoints', () => { const { header } = await makeRequest('/mundo/c0000000001o'); expect(header.vary).toBe( - 'X-country, mvt-simorgh_dark_mode, Accept-Encoding', + 'X-Country, mvt-simorgh_dark_mode, Accept-Encoding', ); }); @@ -1477,7 +1477,7 @@ describe('Server HTTP Headers - Page Endpoints', () => { const { header } = await makeRequest('/mundo/articles/c0000000001o'); - expect(header.vary).toBe('X-country, Accept-Encoding'); + expect(header.vary).toBe('X-Country, Accept-Encoding'); }); it(`should not add mvt experiment header names to vary if on AMP`, async () => { @@ -1489,7 +1489,7 @@ describe('Server HTTP Headers - Page Endpoints', () => { const { header } = await makeRequest('/mundo/articles/c0000000001o'); - expect(header.vary).toBe('X-country, Accept-Encoding'); + expect(header.vary).toBe('X-Country, Accept-Encoding'); }); it(`should set isUK value to true when 'x-bbc-edge-isuk' is set to 'yes'`, async () => {