Bitbucket Server HTTPS request is redirecting back to HTTP URL during application links creation
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When try to create an Application Links to JIRA, a timed out error message shows up in background and saw this Javascript error message in the browser console:
Mixed content: The page at 'https://bitbucket-url' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://bitbucket-url'. This request has been blocked; the content must be served over HTTPS.
Diagnosis
Environment
- A reverse proxy server forwarding HTTPS to Bitbucket Server.
Cause
The proxy configuration is not configured properly for Bitbucket Server. For more details information, refer to Securing Bitbucket Server behind nginx using SSL.
Resolution
Bitbucket Server 5.0+
Add 'proxy.name', 'proxy.port', 'secure' and 'scheme' parameters in the bitbucket.properties.
Example:
server.scheme=https
server.proxy-port=443
server.proxy-name=mycompany.com
server.secure=true
Bitbucket Server 4.x and below
Add 'ProxyName', 'ProxyPort' and 'scheme' parameters in the Bitbucket Server server.xml.