• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • Jenkins 1.496 and Build Failure Analyzer 1.4.0

      I use a reverse proxy on my jenkins with a security management and icons are no more displayed from 1.4.0 version.
      Plugin does not use the reverse proxy for create image url : http://computer_name:8080//plugin/build-failure-analyzer/images/48x48/information.png.

          [JENKINS-16868] Icons are not displayed with a reverse proxy

          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.

          Walter Kacynski added a comment - 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.

          I am also experiencing the double /jenkins/ path and my Jenkins is installed at http://leeroy.centtech.com/jenkins/ this is of course breaking the images. Is there a interim fix for this?

          Patrick Roberts added a comment - I am also experiencing the double /jenkins/ path and my Jenkins is installed at http://leeroy.centtech.com/jenkins/ this is of course breaking the images. Is there a interim fix for this?

          I used this mod_rewrite rule to add in the mapping for /jenkins/jenkins
          RewriteRule ^/jenkins/jenkins/(.*)$ http://TSTJENK001.xxxx:8080/jenkins/$1 [P]

          Walter Kacynski added a comment - I used this mod_rewrite rule to add in the mapping for /jenkins/jenkins RewriteRule ^/jenkins/jenkins/(.*)$ http://TSTJENK001.xxxx:8080/jenkins/$1 [P]

          This is a problem if you use Jenkins over https as well.

          Petrik van der Velde added a comment - This is a problem if you use Jenkins over https as well.

          rsandell added a comment -

          So 1.10.3 did not fix this?

          rsandell added a comment - So 1.10.3 did not fix this?

          rsandell added a comment -

          I think we should start using the icon-shim plugin for all the icons so all those problems can be shoved over there.

          rsandell added a comment - I think we should start using the icon-shim plugin for all the icons so all those problems can be shoved over there.

          It turns out when setting the Jenkins location (in the settings) correctly it all works. I didn't realize that's where the base URL would come from but it seems to be working at the moment.

          Petrik van der Velde added a comment - It turns out when setting the Jenkins location (in the settings) correctly it all works. I didn't realize that's where the base URL would come from but it seems to be working at the moment.

          Daniel Beck added a comment -

          Jenkins should display a warning on /manage if that URL is wrong, pointing you to https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+says+my+reverse+proxy+setup+is+broken

          Daniel Beck added a comment - Jenkins should display a warning on /manage if that URL is wrong, pointing you to https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+says+my+reverse+proxy+setup+is+broken

          I am running into the same issue as I need to access the host via SSH port forwarding. Possibly naive question: why does this work for all the other plug ins, just BFA seems to have a problem?

          Thanks a lot for all the work,
          Michael

          Michael Tautschnig added a comment - I am running into the same issue as I need to access the host via SSH port forwarding. Possibly naive question: why does this work for all the other plug ins, just BFA seems to have a problem? Thanks a lot for all the work, Michael

          Sorin Sbarnea added a comment -

          I am using it (1.16) in the same configuration without problems so I assume this was fixed.

          Sorin Sbarnea added a comment - I am using it (1.16) in the same configuration without problems so I assume this was fixed.

            t_westling Tomas Westling
            sylvainc Sylvain C.
            Votes:
            7 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: