Open m1212e opened 4 months ago
Also my adapter is configured like this:
adapter: adapter({
dynamic_origin: true,
}),
update: probably fixed by https://github.com/gornostay25/svelte-adapter-bun/commit/8140529
I ended up just doing
const requestFixupHandle: Handle = async ({ event, resolve }) => {
// yes this is also still necessary . silly shit. this one is for the redirect url
if (env.IS_HTTPS == "1")
event.url = new URL(event.url.toString().replace(/^http:/, "https:"))
// authjs is a naughty beast and uses this other url (event.request.url)
// which is Request#url which is readonly.. use some hax
event.request = new Request(event.url, {
method: event.request.method,
headers: event.request.headers,
body: event.request.body,
referrer: event.request.referrer,
referrerPolicy: event.request.referrerPolicy,
mode: event.request.mode,
credentials: event.request.credentials,
cache: event.request.cache,
redirect: event.request.redirect,
integrity: event.request.integrity,
//@ts-ignore
duplex: event.request.duplex
});
return resolve(event);
};
hope it helps you proceed!
Hi, no matter if I configure
ORIGIN
,PROTOCOL_HEADER
orHOST_HEADER
my load function gets the URL as HTTP not HTTPS.My load function:
My envs:
My console output on request:
Whats the problem here?