fix: restrict usernames that are keywords

fix: the rest of the typo (unsunscribe to unsubscribe)

fix: restrict copyright and copyright-policy and add appropriate redirects

fix/forgot-to-save-this-file-before-last-commit

fix: remove-duplicate+fix-typo

fix: update-snapshot
This commit is contained in:
moT01
2019-08-29 08:45:35 -05:00
committed by mrugesh
parent 70b7080833
commit afc431e900
3 changed files with 23 additions and 7 deletions

View File

@ -19,12 +19,17 @@ export const blacklistedUsernames = [
'challenge-completed',
'challenges',
'chat',
'code-of-conduct',
'coding-bootcamp-cost-calculator',
'completed-bonfire',
'completed-challenge',
'completed-field-guide',
'completed-zipline-or-basejump',
'copyright',
'copyright-policy',
'deprecated-signin',
'donate',
'email-signin',
'events',
'explorer',
'external',
@ -32,35 +37,42 @@ export const blacklistedUsernames = [
'forgot',
'forum',
'get-help',
'get-help',
'get-pai',
'guide',
'how-nonprofit-projects-work',
'internal',
'jobs',
'jobs-form',
'learn',
'learn-to-code',
'login',
'logout',
'map',
'modern-challenge-completed',
'news',
'nonprofit-project-instructions',
'nonprofits',
'nonproifts-form',
'nonprofits-form',
'open-api',
'passwordless-change',
'pmi-acp-agile-project-managers',
'pmi-acp-agile-project-managers-form',
'privacy',
'privacy',
'privacy-policy',
'project-completed',
'reset',
'services',
'shop',
'signin',
'signout',
'signup',
'sitemap.xml',
'software-resources-for-nonprofits',
'sponsors',
'stories',
'support',
'terms',
'terms-of-service',
'the-fastest-web-page-on-the-internet',
'twitch',
'unsubscribe',

View File

@ -13,6 +13,8 @@ exports[`createRedirects matches the snapshot 1`] = `
/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
/copyright https://news.example.com/copyright-policy 200
/copyright-policy https://news.example.com/copyright-policy 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
@ -41,9 +43,9 @@ exports[`createRedirects matches the snapshot 1`] = `
/:username/back-end-certification /certification/:username/legacy-back-end 301
/:username/full-stack-certification /certification/:username/full-stack 301
# unsunscribe redirects
# unsubscribe redirects
/u/* https://api.example.com/u/:splat 200
/unsunscribe/* https://api.example.com/unsunscribe/:splat 200
/unsubscribe/* https://api.example.com/unsubscribe/:splat 200
/ue/* https://api.example.com/ue/:splat 200
# misc redirects

View File

@ -34,6 +34,8 @@ const template = `
/about #{{NEWS}}/about 200
/academic-honesty #{{NEWS}}/academic-honesty 200
/code-of-conduct #{{NEWS}}/code-of-conduct 200
/copyright #{{NEWS}}/copyright-policy 200
/copyright-policy #{{NEWS}}/copyright-policy 200
/privacy #{{NEWS}}/privacy-policy 200
/privacy-policy #{{NEWS}}/privacy-policy 200
/sponsors #{{NEWS}}/sponsors 200
@ -62,9 +64,9 @@ const template = `
/:username/back-end-certification /certification/:username/legacy-back-end 301
/:username/full-stack-certification /certification/:username/full-stack 301
# unsunscribe redirects
# unsubscribe redirects
/u/* #{{API}}/u/:splat 200
/unsunscribe/* #{{API}}/unsunscribe/:splat 200
/unsubscribe/* #{{API}}/unsubscribe/:splat 200
/ue/* #{{API}}/ue/:splat 200
# misc redirects