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

Request blocked due to HTTP/HTTPS mismatch

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When you click "Add" button to add a new credential, it tries to access the following URL:

      http://domain/descriptor/com.cloudbees.plugins.credentials.CredentialsSelectHelper/resolver/com.cloudbees.plugins.credentials.CredentialsSelectHelper$SystemContextResolver/provider/com.cloudbees.plugins.credentials.SystemCredentialsProvider$ProviderImpl/context/jenkins/dialog

      But it seems to be hardcoding the protocol to HTTP, which causes the request to fail due to mixed http/https content

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java
          src/main/resources/lib/credentials/select.jelly
          http://jenkins-ci.org/commit/credentials-plugin/3df32600cd96465f87d19ef04b2e91285ab1f7f3
          Log:
          JENKINS-35150 We can be more forgiving of users with misconfigured HTTPS front-ends

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java src/main/resources/lib/credentials/select.jelly http://jenkins-ci.org/commit/credentials-plugin/3df32600cd96465f87d19ef04b2e91285ab1f7f3 Log: JENKINS-35150 We can be more forgiving of users with misconfigured HTTPS front-ends
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java
          src/main/resources/lib/credentials/select.jelly
          http://jenkins-ci.org/commit/credentials-plugin/3df32600cd96465f87d19ef04b2e91285ab1f7f3
          Log:
          JENKINS-35150 We can be more forgiving of users with misconfigured HTTPS front-ends

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java src/main/resources/lib/credentials/select.jelly http://jenkins-ci.org/commit/credentials-plugin/3df32600cd96465f87d19ef04b2e91285ab1f7f3 Log: JENKINS-35150 We can be more forgiving of users with misconfigured HTTPS front-ends
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java
          src/main/resources/lib/credentials/select.jelly
          http://jenkins-ci.org/commit/credentials-plugin/ae6cf302aaa0b956df403156bb21f62baf18596b
          Log:
          Merge pull request #53 from jenkinsci/jenkins-35150

          JENKINS-35150 We can be more forgiving of users with misconfigured HTTPS front-ends

          Compare: https://github.com/jenkinsci/credentials-plugin/compare/e2bd270c0a41...ae6cf302aaa0

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/com/cloudbees/plugins/credentials/CredentialsSelectHelper.java src/main/resources/lib/credentials/select.jelly http://jenkins-ci.org/commit/credentials-plugin/ae6cf302aaa0b956df403156bb21f62baf18596b Log: Merge pull request #53 from jenkinsci/jenkins-35150 JENKINS-35150 We can be more forgiving of users with misconfigured HTTPS front-ends Compare: https://github.com/jenkinsci/credentials-plugin/compare/e2bd270c0a41...ae6cf302aaa0
          Hide
          david_perez David Pérez added a comment - - edited

          I have the same problem.
          How must I configure Apache?

          My current Apache config:

          ProxyPass         /jenkins  http://localhost:8090/jenkins nocanon
          ProxyPassReverse  /jenkins  http://localhost:8090/jenkins
          ProxyRequests     Off
          AllowEncodedSlashes NoDecode
          
          # Local reverse proxy authorization override
          <Proxy http://localhost:8090/jenkins*>
            Order deny,allow
            Allow from all
          </Proxy>
          
          Show
          david_perez David Pérez added a comment - - edited I have the same problem. How must I configure Apache? My current Apache config: ProxyPass /jenkins http: //localhost:8090/jenkins nocanon ProxyPassReverse /jenkins http: //localhost:8090/jenkins ProxyRequests Off AllowEncodedSlashes NoDecode # Local reverse proxy authorization override <Proxy http: //localhost:8090/jenkins*> Order deny,allow Allow from all </Proxy>
          Hide
          david_perez David Pérez added a comment - - edited

          I've added the X-Forwarded headers and now Jenkins.getActiveInstance().getRootUrlFromRequest() returns https.

          Show
          david_perez David Pérez added a comment - - edited I've added the X-Forwarded headers and now Jenkins.getActiveInstance().getRootUrlFromRequest() returns https.

            People

            Assignee:
            stephenconnolly Stephen Connolly
            Reporter:
            canassa Cesar Canassa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: