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

Jenkins redirecting from https to http

    XMLWordPrintable

Details

    Description

      (Sorry – I'm not sure what component this falls under)

      I have a ssl proxy on another machine in front of jenkins. The ssl proxy listens on port 8080 and forwards to Jenkins on port 8080.

      After I submit my login details to Jenkins on https://domain.com:8080/login, it redirects me to http://domain.com:8080. I'd like to stay on https. I've configured the Jenkins URL to be https://domain.com:8080, but it didn't seem to make a difference.

      Two solutions?

      1. Never change the protocol. If the redirect was to '/' instead of 'http://domain.com', there would be no problem.
      2. The proxy adds a X-Forwarded-Proto to each request – could Jenkins look at that and realize it's a https request?

      Attachments

        Issue Links

          Activity

            bartvh Bart Vanhaute added a comment -

            Since upgrading from 1.559 to 1.562, I am seeing this also.
            Should this issue be reopened, or create a new one?

            bartvh Bart Vanhaute added a comment - Since upgrading from 1.559 to 1.562, I am seeing this also. Should this issue be reopened, or create a new one?

            Same issue on Centos with version 1.565. It works if I rollback to version 1.558.

            pmoiroux Patrick Moiroux added a comment - Same issue on Centos with version 1.565. It works if I rollback to version 1.558.

            It works with version 1.565 if I add this to my Apache config:

            Header edit Location ^http://www.example.com/jenkins/ https://www.example.com/jenkins/

            It was not required with version 1.558 so I don't know whether you want to consider it as a bug or not..
            Thanks

            pmoiroux Patrick Moiroux added a comment - It works with version 1.565 if I add this to my Apache config: Header edit Location ^ http://www.example.com/jenkins/ https://www.example.com/jenkins/ It was not required with version 1.558 so I don't know whether you want to consider it as a bug or not.. Thanks
            danielbeck Daniel Beck added a comment -

            Patrick: Might just be related to configuration. Make sure your reverse proxy sets the X-Forwarded-Proto header.

            That being said, it makes no sense to reopen a three year old issue for a regression within the last ~6 weeks. Please file a new issue (you can link it as 'related' to this one under 'More Actions'). If possible, determine the exact release the regression occurred, and post your reverse proxy config.

            danielbeck Daniel Beck added a comment - Patrick: Might just be related to configuration. Make sure your reverse proxy sets the X-Forwarded-Proto header. That being said, it makes no sense to reopen a three year old issue for a regression within the last ~6 weeks. Please file a new issue (you can link it as 'related' to this one under 'More Actions'). If possible, determine the exact release the regression occurred, and post your reverse proxy config.

            I am seeing this issue in the latest version as well.

            I have deployed the Jenkins docker image in GKE with GCP load balancer with real ssl certificates.

            some of the URLs working with HTTPS , but some are getting redirected to http://

            I did try with multiple versions 

            for example configuration-as-code

             

             

            bmanikantareddy Manikantareddy Buchi added a comment - I am seeing this issue in the latest version as well. I have deployed the Jenkins docker image in GKE with GCP load balancer with real ssl certificates. some of the URLs working with HTTPS , but some are getting redirected to http:// I did try with multiple versions  for example configuration-as-code    

            People

              Unassigned Unassigned
              joevandyk Joe Van Dyk
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: