workers-rs icon indicating copy to clipboard operation
workers-rs copied to clipboard

req.url() always returns production url

Open Suyashtnt opened this issue 2 years ago • 1 comments

read title. For ms oauth2 i need to send a redirect URL when getting the token and I want to get the URL used programatically instead of somehow hard coding it for dev and prod

        .get_async("/microsoft_auth", |req, ctx| async move {
            let url = req.url().unwrap(); // this is always the production url

Suyashtnt avatar Apr 23 '22 08:04 Suyashtnt

This causes problem with local development where we need to get real host (ie. localhost:8787)

jancespivo avatar May 18 '23 14:05 jancespivo