Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cross-site post form submissions are forbidden when using load balancer in front #61

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

KumanoTanaka
Copy link

@KumanoTanaka KumanoTanaka commented Jul 7, 2024

In my use case

  • end-client -(https)-> GCP load balancer -(http)-> docker containerized app using svelte-adapter-bun

key points

  • gcp load balancer request to my svelte app by using http://my-domain.com url but https is set to X-Forwarded-Proto. <-- so I want to modify request's base-url on every request. (even ORIGIN === get_origin(request.headers) case).
  • docker containerized app such as k8s, google-cloud cloudrun uses health check request which dose not contain x-forwarded-for header. <-- I want to ignore "ADDRESS_HEADER" check of those health-check requests

(GCP load balancer http-header forwarding rules are described here)

I think this PR will help issue #54

@dihmeetree
Copy link

Thank you for this fix. Was trying to figure this out for like 2 hours lol. Can confirm it fixes the issue 🙂

@kjell0w
Copy link

kjell0w commented Aug 26, 2024

Do we have any updates on this? Will this be merged? Seems like the issue still persists

@vyconm
Copy link

vyconm commented Aug 26, 2024

Please merge this - it's the only thing holding us back from deploying it in production, due to issue #54 which If I understand correctly, is related to this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants