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

fixes issue #6283 #6300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fixes issue #6283 #6300

wants to merge 1 commit into from

Conversation

viveak910
Copy link

Hey, I fixed the issue with the Host header! The problem was that the proxy was sending requests with the wrong Host, so I updated the onProxyReq function to set it correctly to the API backend (api.myapp). Now, requests are going to the right place, and the “connection refused” error should be gone.

Let me know if it works for you!

@mister-roboto
Copy link

@viveak910 you need to sign the Plone Contributor Agreement to merge this pull request.

Learn about the Plone Contributor Agreement: https://plone.org/foundation/contributors-agreement

Copy link

netlify bot commented Sep 20, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 78ea5d7
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/66ed649999eeee0008f97492

@viveak910
Copy link
Author

I have already signed the Plone contributor agreement. but I am getting an error about that. please kindly check

@viveak910 viveak910 marked this pull request as draft September 20, 2024 13:58
@viveak910
Copy link
Author

@viveak910 you need to sign the Plone Contributor Agreement to merge this pull request.

Learn about the Plone Contributor Agreement: https://plone.org/foundation/contributors-agreement

i already signed the aggrement
PLONE FOUNDATION contributor agreement Plone.pdf

@viveak910 viveak910 marked this pull request as ready for review September 20, 2024 14:06
@wesleybl
Copy link
Member

@viveak910 You need to wait to be added to the plone organization.

@stevepiercy
Copy link
Collaborator

@viveak910 you're writing to a bot.

Please read and follow First-time contributors, especially mr-roboto on GitHub, Contributing to Plone, and Contributing to Volto.

@djay
Copy link
Member

djay commented Sep 23, 2024

@viveak910 thanks for the fix. if it's not too much touble it would be nice to add in these headers too. These are used in logging to ensure the original IP address is recorded or perhaps for routing purposes.

    headers: {
      'X-Real-IP': req.ip,
      'X-Forwarded-For': req.ip,
      'X-Forwarded-Host': req.hostname,

@viveak910
Copy link
Author

will do @djay

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

Successfully merging this pull request may close these issues.

Middleware proxy doesn't change the host header so can't be used with an API on a shared IP
5 participants