Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed Content error on production #395

Open
ansaryanparviz opened this issue Oct 1, 2024 · 1 comment
Open

Mixed Content error on production #395

ansaryanparviz opened this issue Oct 1, 2024 · 1 comment

Comments

@ansaryanparviz
Copy link

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.

@btxtiger
Copy link

btxtiger commented Oct 2, 2024

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;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants