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

Do not add prefix of context twice when calculating base Url #24

Merged
merged 1 commit into from
Oct 13, 2014

Conversation

wolfs
Copy link
Member

@wolfs wolfs commented Oct 10, 2014

We have the problem that the images of the plugin is not showing in the UI. We have Jenkins runnning under the /ci prefix and configured this as Jenkins URL on the configuration page.
This change should fix the problem.

@rsandell
Copy link
Member

Quoting @TWestling in pull #6

We have had a lot of issues regarding these images, fixing it for someone breaks it for two others, therefore, could you check:
Does this work with Jenkins behind a reverse proxy?
Does it work when Jenkins is not behind a reverse proxy?
Does it work with Jenkins installed at root context?
Does it work with Jenkins installed at a named context?

And combinations of the above.

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@wolfs
Copy link
Member Author

wolfs commented Oct 10, 2014

What combinations do you want me to check? If you compare the code from Hudson.getInstance().getRootUrl() and the original code from getFullImageUrl then you see that it is basically identical. The only difference is that the prefix it added to the url from the mailer, but the prefix should already be configured there.

@wolfs
Copy link
Member Author

wolfs commented Oct 12, 2014

So I tested the following combinations:

named context URL configured behind reverse proxy
yesnono
yesyesno
nonono
noyesno
yesyesyes
noyesyes

For a reverse proxy I assume that the Jenkins URL always has to be configured in the configuration page. Moreover, when using a reverse proxy the prefix on the proxy has to be the same as the prefix configured on Jenkins. At least I did not find a manual describing on how to remap the prefix behind a reverse proxy and my intents failed.
I did use nginx as reverse proxy.
With the current configuration there are always two slashes between the base URL and the image path. This does not break anything, so I left it as is.

Do you want me to test some more?

rsandell added a commit that referenced this pull request Oct 13, 2014
Do not add prefix of context twice when calculating base Url
@rsandell rsandell merged commit f23a94d into jenkinsci:master Oct 13, 2014
@rsandell
Copy link
Member

Well, lets see if it holds this time 🎱

@wolfs
Copy link
Member Author

wolfs commented Oct 13, 2014

Would you pull a new release? If you prefer I can do that, too.

@rsandell
Copy link
Member

It's on its way.

@wolfs
Copy link
Member Author

wolfs commented Oct 13, 2014

Thanks!

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.

3 participants