File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +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 productionOrigin = "https://docs.redpanda.com" ;
5+ const originalOrigin = url . origin ;
66
77 // Redirects from old API paths to new ones
88 const redirects = {
@@ -77,9 +77,9 @@ export default async (request, context) => {
7777 footerWidget ,
7878 ] = await Promise . all ( [
7979 bumpRes . text ( ) ,
80- fetchWidget ( `${ productionOrigin } /assets/widgets/head-bump.html` , "head-bump" ) ,
81- fetchWidget ( `${ productionOrigin } /assets/widgets/header.html` , "header" ) ,
82- fetchWidget ( `${ productionOrigin } /assets/widgets/footer.html` , "footer" ) ,
80+ fetchWidget ( `${ originalOrigin } /assets/widgets/head-bump.html` , "head-bump" ) ,
81+ fetchWidget ( `${ originalOrigin } /assets/widgets/header.html` , "header" ) ,
82+ fetchWidget ( `${ originalOrigin } /assets/widgets/footer.html` , "footer" ) ,
8383 ] ) ;
8484
8585 const document = new DOMParser ( ) . parseFromString ( originalHtml , "text/html" ) ;
You can’t perform that action at this time.
0 commit comments