Skip to content

Confused about svelte's fetch behavior in load functions #13823

Closed Answered by levi-jcbs
levi-jcbs asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you very much, @eltigerchino. You are right, I think this is actually a vite issue.

I can't configure vite to to take the origin from x-forwarded- headers when running behind a reverse proxy. I think that's just a missing feature. When building the app and running with node, it works just fine.

But thats no problem, I can just configure vite to proxy the api and run on port 80 so I can get completely rid of the reverse proxy in my dev envirnonment. I actually don't need https because the browser allows to send cookies with secure flag over http on localhost.

I've commited the neccesary changes and some explanation to the reproduction repo: levi-jcbs/svelte-external-api-test@af5c012

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by levi-jcbs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants