Mixed Content error on production
Opened this issue · 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.
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;
}