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

Update entrypoint.sh so proxy can listen on a port other than 8080 #14

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

Conversation

binduwavell
Copy link

@binduwavell binduwavell commented Jul 8, 2021

Prior to this change, if the proxy is configured to listen on say port 80 and you goto http://localhost/share, you will be redirected to http://localhost:8080/share/page/. This is because nginx is fowarding localhost:8080 to Share's Tomcat and when Share creates fully qualified URLs, it includes the port that should be hidden by nginx.

Prior to this change, if the proxy is configured to listen on say port 80 and you goto http://localhost/share, you will be redirected to http://localhost:8080/share/page/. This is because nginx is fowarding localhost:8080 to Share's tomcat and when share creates fully qualified URLs, it includes the port that should be hidden by nginx.
@binduwavell
Copy link
Author

@hi-ko on Discord suggested adding the following headers as well:

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

These are apparently default on the ubuntu nginx configuration and could help with other relaying issues.

I'm happy to update my PR with this information or possibly add above the location level so it applies to all "routes"... I figured I'd wait for feedback before making any changes.

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.

1 participant