From 777819c2d0f298441f14f149a4c9ca777983248f Mon Sep 17 00:00:00 2001 From: Claas Augner <495429+caugner@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:17:55 +0200 Subject: [PATCH 1/3] fix(broken-links): add exception for HTTP Observatory --- build/flaws/broken-links.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/build/flaws/broken-links.ts b/build/flaws/broken-links.ts index 61ad773af1a7..1d2af096bcb2 100644 --- a/build/flaws/broken-links.ts +++ b/build/flaws/broken-links.ts @@ -234,6 +234,7 @@ export function getBrokenLinksFlaws( } else if ( href.startsWith("https://developer.mozilla.org/") && !href.startsWith("https://developer.mozilla.org/en-US/curriculum/") && + !href.startsWith("https://developer.mozilla.org/en-US/observatory") && !href.startsWith("https://developer.mozilla.org/en-US/blog/") ) { // It might be a working 200 OK link but the link just shouldn't From 48b0031831e00910e1f84c9eeea9f38e4d4374ae Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Thu, 4 Jul 2024 10:52:02 +0200 Subject: [PATCH 2/3] fixup! fix(broken-links): add exception for HTTP Observatory --- build/flaws/broken-links.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/flaws/broken-links.ts b/build/flaws/broken-links.ts index 1d2af096bcb2..30f53aff04a5 100644 --- a/build/flaws/broken-links.ts +++ b/build/flaws/broken-links.ts @@ -286,7 +286,7 @@ export function getBrokenLinksFlaws( } else if ( href.startsWith("/") && !href.startsWith("//") && - !/^\/(discord|en-US\/(blog|curriculum))(\/|$)/.test(href) + !/^\/(discord|en-US\/(blog|curriculum|observatory))(\/|$)/.test(href) ) { // Got to fake the domain to sensible extract the .search and .hash const absoluteURL = new URL(href, "http://www.example.com"); From 83ccd73933b37b50a1a558b0a78716353082ab8d Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Thu, 4 Jul 2024 10:55:24 +0200 Subject: [PATCH 3/3] chore(macros/HTTPSidebar): use relative link to Observatory --- kumascript/macros/HTTPSidebar.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kumascript/macros/HTTPSidebar.ejs b/kumascript/macros/HTTPSidebar.ejs index eaa828b301f9..1cc39f7575cf 100644 --- a/kumascript/macros/HTTPSidebar.ejs +++ b/kumascript/macros/HTTPSidebar.ejs @@ -326,7 +326,7 @@ var text = mdn.localStringMap({
  • <%-web.smartLink(`/${locale}/docs/Web/HTTP/Headers/X-Frame-Options`, null, "X-Frame-Options")%>
  • <%-web.smartLink(`/${locale}/docs/Web/HTTP/Headers/X-XSS-Protection`, null, "X-XSS-Protection")%>
  • <%-web.smartLink(`/${locale}/docs/Web/Security/Practical_implementation_guides`)%>
  • -
  • HTTP Observatory
  • +
  • HTTP Observatory