Skip to content

Commit

Permalink
FIX: case sesnsitive check (#11616)
Browse files Browse the repository at this point in the history
* FIX: case sesnsitive check

* FIX: test case
  • Loading branch information
eagerterrier committed May 10, 2024
1 parent 0c1d962 commit 7f29eae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/server/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions src/server/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
});

Expand All @@ -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 () => {
Expand All @@ -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 () => {
Expand Down

0 comments on commit 7f29eae

Please sign in to comment.