File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.56/deno-dom-wasm.ts
22
33export default async ( request , context ) => {
44 const url = new URL ( request . url ) ;
5- const originalOrigin = "https://docs.redpanda.com" ;
6- const currentOrigin = url . origin ;
5+ const originalOrigin = url . origin ;
76
87 // Redirects from old API paths to new ones
98 const redirects = {
@@ -83,13 +82,10 @@ export default async (request, context) => {
8382 fetchWidget ( `${ originalOrigin } /assets/widgets/footer.html` , "footer" ) ,
8483 ] ) ;
8584
86- // Rewrite absolute docs.redpanda.com URLs to use current origin to avoid CORS and history API issues
87- const rewrittenHtml = originalHtml . replace ( / h t t p s : \/ \/ d o c s \. r e d p a n d a \. c o m / g, currentOrigin ) ;
88-
89- const document = new DOMParser ( ) . parseFromString ( rewrittenHtml , "text/html" ) ;
85+ const document = new DOMParser ( ) . parseFromString ( originalHtml , "text/html" ) ;
9086 if ( ! document ) {
9187 console . error ( "❌ Failed to parse Bump.sh HTML." ) ;
92- return new Response ( rewrittenHtml , {
88+ return new Response ( originalHtml , {
9389 status : 200 ,
9490 headers : { "content-type" : "text/html; charset=utf-8" } ,
9591 } ) ;
You can’t perform that action at this time.
0 commit comments