log-viewer icon indicating copy to clipboard operation
log-viewer copied to clipboard

Mixed Content error on production

Open parvizansarian opened this issue 1 year ago • 1 comments

log-viewer:14 Mixed Content: The page at 'https://td-backend.haigc9nfsver6.eu-west-2.cs.amazonlightsail.com/log-viewer' was loaded over HTTPS, but requested an insecure stylesheet 'http://td-backend.haigc9nfsver6.eu-west-2.cs.amazonlightsail.com/vendor/log-viewer/app.css?id=5593a0331dd40729ff41e32a6035d872'. This request has been blocked; the content must be served over HTTPS. log-viewer:1 Mixed Content: The page at 'https://td-backend.haigc9nfsver6.eu-west-2.cs.amazonlightsail.com/log-viewer' was loaded over HTTPS, but requested an insecure script 'http://td-backend.haigc9nfsver6.eu-west-2.cs.amazonlightsail.com/vendor/log-viewer/app.js?id=6c51578cafcbf2f5e90fbf568a61ab8f'. This request has been blocked; the content must be served over HTTPS. log-viewer:1 Mixed Content: The page at 'https://td-backend.haigc9nfsver6.eu-west-2.cs.amazonlightsail.com/log-viewer' was loaded over HTTPS, but requested an insecure favicon 'http://td-backend.haigc9nfsver6.eu-west-2.cs.amazonlightsail.com/vendor/log-viewer/img/log-viewer-32.png?id=f8ec67d10f996aa8baf00df3b61eea6d'. This request has been blocked; the content must be served over HTTPS.

parvizansarian avatar Oct 01 '24 07:10 parvizansarian

I was facing the same issue today. However I dont think its related to this package. While running Laravel as reverse proxy, some urls will be rendered as http, even if you had set your .env correctly.

A workaround is to add the https header to your Laravel nginx

location @octane {
    ...
    proxy_set_header X-Forwarded-Proto https;
}

Or if you are using the same config for local and prod: (otherwise http would be served as https)

map $http_x_forwarded_proto $real_scheme {
    ''      $scheme;
    default $http_x_forwarded_proto;
}

server {
    location @octane {
        ...
        proxy_set_header X-Forwarded-Proto $real_scheme;
    }

jonaaix avatar Oct 02 '24 14:10 jonaaix

Closing, likely server configuration issue. Thanks for the tip @btxtiger ! 🙌

arukompas avatar Feb 09 '25 15:02 arukompas