ctx.url.origin is always localhost:port / 0.0.0.0:port #76
-
The origin is always localhost or 0.0.0.0 even opening from another device in the same Network. While developing i use both my pc and phone and since the origin is always localhost, the redirect from page guard is redirecting me to 0.0.0.0:3000/ on my phone's browser |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
One more thing to note.. ctx.url.origin is https://undefined when using with vite plugin mkcert 🤔 |
Beta Was this translation helpful? Give feedback.
-
This is a bug, thank you for reporting. I couldn't yet figure out what's wrong exactly but I will :) |
Beta Was this translation helpful? Give feedback.
-
It seems that
Sorry, ignore the second paragraph. It doesn't work because of a hattip bug. |
Beta Was this translation helpful? Give feedback.
-
Sorry, updated the one up there. HatTip has a bug preventing it from working. Looking at it now. |
Beta Was this translation helpful? Give feedback.
-
Fixed the HatTip bug. Upgrade |
Beta Was this translation helpful? Give feedback.
Fixed the HatTip bug. Upgrade
rakkasjs
to0.6.2-next.9
and@hattip/*
to0.0.20
and use theORIGIN
env var like this:ORIGIN=https://localhost:4173 rakkas preview --https
with the correct origin. I'll investigate whyvite-plugin-mkcert
doesn't set theHost
header and why relative redirects don't pick up the correct origin.