fix(redirects): update redirection paths and codes
This commit is contained in:
@ -1,24 +1,30 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`createRedirects matches the snapshot 1`] = `
|
exports[`createRedirects matches the snapshot 1`] = `
|
||||||
"#api redirect
|
"
|
||||||
|
#
|
||||||
|
# WARNING: The order of this list is very important.
|
||||||
|
#
|
||||||
|
|
||||||
# client-route proxy
|
#api redirect
|
||||||
/internal/* https://api.example.com/internal/:splat 200
|
/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
|
||||||
|
/code-of-conduct https://news.example.com/code-of-conduct 200
|
||||||
|
/privacy https://news.example.com/privacy-policy 200
|
||||||
|
/privacy-policy https://news.example.com/privacy-policy 200
|
||||||
|
/sponsors https://news.example.com/sponsors 200
|
||||||
|
/support https://news.example.com/support 200
|
||||||
|
/shop #{{news}}/shop 200
|
||||||
|
/terms https://news.example.com/terms-of-service 200
|
||||||
|
/terms-of-service https://news.example.com/terms-of-service 200
|
||||||
|
|
||||||
# applications
|
# applications
|
||||||
/news/* https://news.example.com/:splat 200
|
/news/* https://news.example.com/:splat 200
|
||||||
/forum/* https://forum.example.com/:splat 200
|
/forum/* https://forum.example.com/:splat 200
|
||||||
|
|
||||||
# pages
|
|
||||||
/about https://news.example.com/about
|
|
||||||
/terms-of-service https://news.example.com/terms-of-service
|
|
||||||
/terms https://news.example.com/terms-of-service
|
|
||||||
/academic-honesty https://news.example.com/academic-honesty
|
|
||||||
/code-of-conduct https://news.example.com/code-of-conduct
|
|
||||||
/privacy-policy https://news.example.com/privacy-policy
|
|
||||||
/privacy https://news.example.com/privacy-policy
|
|
||||||
|
|
||||||
# auth redirects
|
# auth redirects
|
||||||
/signin https://api.example.com/signin 200
|
/signin https://api.example.com/signin 200
|
||||||
/signup https://api.example.com/signin 200
|
/signup https://api.example.com/signin 200
|
||||||
|
@ -22,24 +22,30 @@ exports.createRedirects = function createRedirects(locations) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-len */
|
/* eslint-disable max-len */
|
||||||
const template = `#api redirect
|
const template = `
|
||||||
|
#
|
||||||
|
# WARNING: The order of this list is very important.
|
||||||
|
#
|
||||||
|
|
||||||
# client-route proxy
|
#api redirect
|
||||||
/internal/* #{{API}}/internal/:splat 200
|
/internal/* #{{API}}/internal/:splat 200
|
||||||
|
|
||||||
|
# pages
|
||||||
|
/about #{{NEWS}}/about 200
|
||||||
|
/academic-honesty #{{NEWS}}/academic-honesty 200
|
||||||
|
/code-of-conduct #{{NEWS}}/code-of-conduct 200
|
||||||
|
/privacy #{{NEWS}}/privacy-policy 200
|
||||||
|
/privacy-policy #{{NEWS}}/privacy-policy 200
|
||||||
|
/sponsors #{{NEWS}}/sponsors 200
|
||||||
|
/support #{{NEWS}}/support 200
|
||||||
|
/shop #{{news}}/shop 200
|
||||||
|
/terms #{{NEWS}}/terms-of-service 200
|
||||||
|
/terms-of-service #{{NEWS}}/terms-of-service 200
|
||||||
|
|
||||||
# applications
|
# applications
|
||||||
/news/* #{{NEWS}}/:splat 200
|
/news/* #{{NEWS}}/:splat 200
|
||||||
/forum/* #{{FORUM}}/:splat 200
|
/forum/* #{{FORUM}}/:splat 200
|
||||||
|
|
||||||
# pages
|
|
||||||
/about #{{NEWS}}/about
|
|
||||||
/terms-of-service #{{NEWS}}/terms-of-service
|
|
||||||
/terms #{{NEWS}}/terms-of-service
|
|
||||||
/academic-honesty #{{NEWS}}/academic-honesty
|
|
||||||
/code-of-conduct #{{NEWS}}/code-of-conduct
|
|
||||||
/privacy-policy #{{NEWS}}/privacy-policy
|
|
||||||
/privacy #{{NEWS}}/privacy-policy
|
|
||||||
|
|
||||||
# auth redirects
|
# auth redirects
|
||||||
/signin #{{API}}/signin 200
|
/signin #{{API}}/signin 200
|
||||||
/signup #{{API}}/signin 200
|
/signup #{{API}}/signin 200
|
||||||
|
Reference in New Issue
Block a user