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

View File

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

View File

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