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

HttpUtils getGitblitURL does not support nonstandard ports #1114

Closed
j123b567 opened this issue Aug 10, 2016 · 1 comment
Closed

HttpUtils getGitblitURL does not support nonstandard ports #1114

j123b567 opened this issue Aug 10, 2016 · 1 comment

Comments

@j123b567
Copy link
Contributor

j123b567 commented Aug 10, 2016

We are using reverse proxy. Gitblit is running only HTTP on port 29080 and apache does reverse proxy to HTTPS 4000.

It is caused by regression in pull request #1086, the solution of #1083.

It is because the port number is doubled. In the path, there is hardcoded check for 80 and 443, but there is no check if host already contains the port number.

With web.canonicalUrl = https://ourhost:4000 graph image is generated as

<img src="https://ourhost:4000:4000/graph/?r=........"></img>

web.canonicalUrl should contain nonstandard port.
Setting just web.canonicalUrl = https://ourhost also does not work.

@dsteinkopf
Copy link
Contributor

dsteinkopf commented Aug 11, 2016

Yes, you're right - I didn't test with non-standart "outside" ports.
What solution do you propose? Extend the mentioned "if" to also check if "host" contains ":"?
Would you like to provide a fix / pull request?

gitblit added a commit that referenced this issue Feb 16, 2017
Fix #1114 HttpUtils getGitblitURL does not support nonstandard ports
@flaix flaix added this to the 1.9.0 milestone Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants