See these comments from Stephen Connolly:

Jenkins.getRootUrlFromRequest() is the one you almost always want to use from code that ends up in a .jelly page. The other one: Jenkins.getRootUrl() is the one to use when dealing with stuff outside of a HTTP request.

If you use them the wrong way around then you end up with secure content warnings or else failed requests as the session will not be maintained across the different host names. Usually this is not a "big deal" as users tend to access via the correct URL in the first place... but it can become a big deal when there is an outage that you are trying to resolve"

In the case of a reverse proxy, using the Mailer information for the URL is fine but you end up appending "contextPath" to the URL which should already be part of the

Mailer.descriptor().getUrl()

It looks like the necessary research has been done in JENKINS-15948 but the change is not being integrated.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to