Bug: Mixed content when used behind reverse proxy #1196

Closed
opened 2026-04-05 16:26:00 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @mezutelni on 2/20/2024

Describe the bug
When trying to setup one uptime behind Haproxy as reverse proxy, register form is trying to request with http scheme resulting in mixed content error

To Reproduce
Steps to reproduce the behavior:

  1. Deploy oneuptime
  2. Configure config.env to use https
  3. Install and configure haproxy to use https and connect to oneuptime:80 without ssl
  4. Tell haproxy to pass "X-Forwarded-Proto" header with "https" value
  5. Register form is returning error
    Mixed Content: The page at 'https://uptime.example.com/accounts/register' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://uptime.example.com/identity/signup'. This request has been blocked; the content must be served over HTTPS.

Also when trying to route request to https port, ssl error
curl -Ik -H "Host: uptime.example.com" https://localhost curl: (35) OpenSSL/3.0.11: error:0A000438:SSL routines::tlsv1 alert internal error
is raised with
ingress-1 | 2024-02-20T10:30:51.855424570Z 2024/02/20 10:30:51 [error] 22#22: *66 cannot load certificate "/etc/nginx/certs/StatusPageCerts/localhost.crt": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/nginx/certs/StatusPageCerts/localhost.crt, r) error:10000080:BIO routines::no such file) while SSL handshaking, client: 172.18.0.1, server: 0.0.0.0:443
this in Ingress container log

Expected behavior
Content is being loaded over https

Desktop (please complete the following information):

  • OS: Debian 12 / Docker

Deployment Type
Docker

*Originally created by @mezutelni on 2/20/2024* **Describe the bug** When trying to setup one uptime behind Haproxy as reverse proxy, register form is trying to request with `http` scheme resulting in mixed content error **To Reproduce** Steps to reproduce the behavior: 1. Deploy oneuptime 2. Configure config.env to use https 3. Install and configure haproxy to use https and connect to oneuptime:80 without ssl 4. Tell haproxy to pass "X-Forwarded-Proto" header with "https" value 5. Register form is returning error `Mixed Content: The page at 'https://uptime.example.com/accounts/register' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://uptime.example.com/identity/signup'. This request has been blocked; the content must be served over HTTPS.` Also when trying to route request to https port, ssl error `curl -Ik -H "Host: uptime.example.com" https://localhost curl: (35) OpenSSL/3.0.11: error:0A000438:SSL routines::tlsv1 alert internal error` is raised with `ingress-1 | 2024-02-20T10:30:51.855424570Z 2024/02/20 10:30:51 [error] 22#22: *66 cannot load certificate "/etc/nginx/certs/StatusPageCerts/localhost.crt": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/nginx/certs/StatusPageCerts/localhost.crt, r) error:10000080:BIO routines::no such file) while SSL handshaking, client: 172.18.0.1, server: 0.0.0.0:443` this in Ingress container log **Expected behavior** Content is being loaded over https **Desktop (please complete the following information):** - OS: Debian 12 / Docker **Deployment Type** Docker
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1196