Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29385

JenkinsUrl doesn't work properly

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Trivial
    • Resolution: Unresolved
    • core
    • Apache redirect https (without rewriting protocol) to jenkins(http).
      Jenkins 1608

    Description

      I am using Jenkins over HTTPS/SSL. I can navigate to https://jenkins.mydomain.com without any problems. All links are correct with https:// in front of them. I can properly navigate through almost all Jenkins pages
      Except when Jenkins tries to redirect (e.g after login, after clicking Build, etc). Whenever Jenkins tries to redirect to any page, it sends me to http:// page (not httpS://)

      In the Code
      I've seen many calls to FormApply.success, that doesnot use JenkinsUrl. and they send a relative path to stapler framework.
      Acording to the StaplerResponse implementation, it completes the URL with (unwanted) request information (line 131):
      https://github.com/stapler/stapler/blob/c290e61aa8d053b45091051d3ed91694cda5112d/core/src/main/java/org/kohsuke/stapler/ResponseImpl.java

      Similar problem was describe here: http://stackoverflow.com/questions/23703523/jenkins-does-not-redirect-to-https

      Thank you.

      Attachments

        Activity

          dperezcabrera David Perez created issue -
          danielbeck Daniel Beck added a comment -

          Please follow the instructions on https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache or base your reverse proxy config on https://github.com/jglick/jenkins-demo-reverse-proxy/

          Then these issues should not appear. If that doesn't help, please include more information on what specifically is the issue. Recent Jenkins versions, with all relevant X-Forwarded-… headers set, and a correct Jenkins URL, should work just fine. Please also mention Jenkins version, Apache version, and the complete configuration of the Apache reverse proxy.

          danielbeck Daniel Beck added a comment - Please follow the instructions on https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache or base your reverse proxy config on https://github.com/jglick/jenkins-demo-reverse-proxy/ Then these issues should not appear. If that doesn't help, please include more information on what specifically is the issue. Recent Jenkins versions, with all relevant X-Forwarded-… headers set, and a correct Jenkins URL, should work just fine. Please also mention Jenkins version, Apache version, and the complete configuration of the Apache reverse proxy.
          dperezcabrera David Perez made changes -
          Field Original Value New Value
          Environment Apache redirect https (without rewriting protocol) to jenkins(http). Apache redirect https (without rewriting protocol) to jenkins(http).
          Jenkins 1608
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 164259 ] JNJira + In-Review [ 181569 ]

          People

            Unassigned Unassigned
            dperezcabrera David Perez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: