fix(csrf): remove all csrf bypass
This commit is contained in:
committed by
mrugesh
parent
f183df0d88
commit
23b899f50f
@ -10,10 +10,6 @@ exports[`createRedirects matches the snapshot 1`] = `
|
||||
https://freecodecamp-dev.netlify.com/* https://www.freecodecamp.dev/:splat 301!
|
||||
https://freecodecamp-org.netlify.com/* https://www.freecodecamp.org/:splat 301!
|
||||
|
||||
|
||||
#api redirect
|
||||
/internal/* https://api.example.com/internal/:splat 200!
|
||||
|
||||
# pages
|
||||
/about https://news.example.com/about 200
|
||||
/academic-honesty https://news.example.com/academic-honesty 200
|
||||
|
@ -31,10 +31,6 @@ const template = `
|
||||
https://freecodecamp-dev.netlify.com/* https://www.freecodecamp.dev/:splat 301!
|
||||
https://freecodecamp-org.netlify.com/* https://www.freecodecamp.org/:splat 301!
|
||||
|
||||
|
||||
#api redirect
|
||||
/internal/* #{{API}}/internal/:splat 200!
|
||||
|
||||
# pages
|
||||
/about #{{NEWS}}/about 200
|
||||
/academic-honesty #{{NEWS}}/academic-honesty 200
|
||||
|
@ -18,7 +18,7 @@ describe('createRedirects', () => {
|
||||
});
|
||||
|
||||
it('replaces instances of `#{{...}}` with the locations provided', () => {
|
||||
expect.assertions(5);
|
||||
expect.assertions(4);
|
||||
|
||||
const apiPlaceholderRE = /#\{\{API\}\}/;
|
||||
const newsPlaceholderRE = /#\{\{NEWS\}\}/;
|
||||
@ -33,8 +33,7 @@ describe('createRedirects', () => {
|
||||
expect(hasNewsPlaceholder).toBe(false);
|
||||
expect(hasForumPlaceholder).toBe(false);
|
||||
|
||||
const { api, forumProxy } = testLocations;
|
||||
expect(redirects.includes(`${api}/internal/:splat`)).toBe(true);
|
||||
const { forumProxy } = testLocations;
|
||||
expect(redirects.includes(`${forumProxy}`)).toBe(true);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user