Base64 Encode Redirect url?

Hi, simple question. I am using the latest caddy.
I just want to do a simple redirect

my current code:

redir @http2 /login?redirect=http://{host}{uri}

it does a simple redirect. However, how do i base64 my redirect url?

I don’t think this is a simple question. I don’t understand what you’re trying to do. Please fill out the help thread template and elaborate on what you expect to happen.

Base64-encoding the redirect URL will break HTTP clients. The spec does not say it should be base64-encoded.

I do some custom stuff in the frontend before redirecting on successful login myself.

The current login url format breaks my website because I am using a hash router for my website, and if the redirect url contains a hash too, my frotends won’t find the route and won’t work.

I need to be able to encode this redirect url so that i can redirect myself later

This topic was automatically closed after 30 days. New replies are no longer allowed.