Deploying to heroku causes mixed content error
See original GitHub issueSpecifically after I deploy I get this:
Mixed Content: The page at 'https://whatever.herokuapp.com/' was loaded over HTTPS, but requested an insecure script 'http://localhost:46655/static/js/client.js'. This request has been blocked; the content must be served over HTTPS.
My package.json looks like this:
{
"name": "my-razzle-app",
"version": "0.1.0",
"license": "MIT",
"scripts": {
"start": "razzle start",
"build": "razzle build",
"test": "razzle test --env=jsdom",
"start:prod": "NODE_ENV=production node build/server.js",
"heroku-postbuild": "npm run build"
},
"dependencies": {
...
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Mixed Content with heroku server - Stack Overflow
Mixed Content : The page at 'https://mywebapp.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://myserverapp.
Read more >Mixed content error fix (Heroku, Laravel 9) - Laracasts
If I understand it correctly, this error happens because asset() helper fetches APP_URL that is not https://. Thing is, in my heroku dashboard...
Read more >How to fix a website with blocked mixed content - Web security
The best strategy to avoid mixed content blocking is to serve all the content as HTTPS instead of HTTP. For your own domain,...
Read more >Mixed HTTP Error with Spring Security App Deployed on Heroku
Mixed Content: The page at '...' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '...'. This request has been blocked; ...
Read more >Fixing mixed content - web.dev
When visiting an HTTPS page in Google Chrome, the browser alerts you to mixed content as errors and warnings in the JavaScript console....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I changed my package.json to this
For Laravel project, add it where ? please