From 6e8a76392960cb95d9b514bb740f00165bdab5cd Mon Sep 17 00:00:00 2001 From: swaggboi Date: Mon, 13 Nov 2023 21:15:26 -0500 Subject: [PATCH] Whoopsies 2: Electric Boogaloo --- lib/Hyperlink-Redirect.rakumod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Hyperlink-Redirect.rakumod b/lib/Hyperlink-Redirect.rakumod index 874d2bf..b4b49d6 100644 --- a/lib/Hyperlink-Redirect.rakumod +++ b/lib/Hyperlink-Redirect.rakumod @@ -30,7 +30,7 @@ $router.post(-> $request, $response { my Str $return-url = fix-protocol($request.content); my Bool $meta-refresh = $request.content.defined; my Str $url-scheme = $request.headers || 'http'; - my Any $url-host = $request.headers; + my Str $url-host = $request.headers; my (Str $base-url, Str $hyperlink, Str %stash); $base-url = $url-scheme ~ '://' ~ $url-host ~ @@ -56,6 +56,6 @@ $router.get('/**', -> $request, $response { my Str $return-url = $request.path.substr(1); # Omits the leading slash my Str $redirect-url = gunzip(decode-base64($return-url, :bin)); - + $response.redirect($redirect-url); });