From fec75eb9b8364e3b2a6747dc3308182a0745ef4e Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 11 Mar 2021 11:37:25 -0500 Subject: [PATCH 1/3] add fundamental redirects for /en-US/Security/CSP Fixes #3199 --- libs/fundamental-redirects/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/fundamental-redirects/index.js b/libs/fundamental-redirects/index.js index e850a6f240e1..32992c71793b 100644 --- a/libs/fundamental-redirects/index.js +++ b/libs/fundamental-redirects/index.js @@ -1167,7 +1167,7 @@ const MISC_REDIRECT_PATTERNS = [ // redirects often take over from there, so let's only insert "/docs/" // and let any other redirect rules work from that point onwards. localeRedirect( - /^(?AJAX|CSS|DOM|DragDrop|HTML|JavaScript|SVG|Tools|Using_files_from_web_applications|Web|XMLHttpRequest)(?\/.+?)?\/?$/i, + /^(?AJAX|CSS|DOM|DragDrop|HTML|JavaScript|SVG|Tools|Using_files_from_web_applications|Web|XMLHttpRequest|CSP)(?\/.+?)?\/?$/i, ({ prefix, subPath = "" }) => `/docs/${prefix}${subPath}`, { permanent: true } ), From 371ddf30984e2defc4e853e1ad7eb9f297ded083 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 11 Mar 2021 15:23:59 -0500 Subject: [PATCH 2/3] Update libs/fundamental-redirects/index.js Co-authored-by: Ryan Johnson --- libs/fundamental-redirects/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/fundamental-redirects/index.js b/libs/fundamental-redirects/index.js index 32992c71793b..439273327bdf 100644 --- a/libs/fundamental-redirects/index.js +++ b/libs/fundamental-redirects/index.js @@ -1167,7 +1167,7 @@ const MISC_REDIRECT_PATTERNS = [ // redirects often take over from there, so let's only insert "/docs/" // and let any other redirect rules work from that point onwards. localeRedirect( - /^(?AJAX|CSS|DOM|DragDrop|HTML|JavaScript|SVG|Tools|Using_files_from_web_applications|Web|XMLHttpRequest|CSP)(?\/.+?)?\/?$/i, + /^(?AJAX|CSS|DOM|DragDrop|HTML|JavaScript|SVG|Tools|Using_files_from_web_applications|Web|XMLHttpRequest|Security)(?\/.+?)?\/?$/i, ({ prefix, subPath = "" }) => `/docs/${prefix}${subPath}`, { permanent: true } ), From c2a27a550111bb22ee25a50d89b200375e4fe9b7 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 11 Mar 2021 15:52:39 -0500 Subject: [PATCH 3/3] feedbacked --- testing/integration/headless/map_301.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testing/integration/headless/map_301.py b/testing/integration/headless/map_301.py index e0a0ab1e4e7f..6771a6754167 100644 --- a/testing/integration/headless/map_301.py +++ b/testing/integration/headless/map_301.py @@ -1035,6 +1035,9 @@ url_test("/en-US/XMLHttpRequest", "/en-US/docs/XMLHttpRequest"), url_test("/en-US/XMLHttpRequest/", "/en-US/docs/XMLHttpRequest"), url_test("/en-US/XMLHttpRequest/FormData/", "/en-US/docs/XMLHttpRequest/FormData"), + url_test("/en-US/Security", "/en-US/docs/Security"), + url_test("/en-US/Security/", "/en-US/docs/Security"), + url_test("/en-US/Security/CSP/", "/en-US/docs/Security/CSP"), # Add trailing slash for the home page. url_test("/en-US", "/en-US/"), # Some special cases for "/docs".