question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploying to heroku causes mixed content error

See original GitHub issue

Specifically 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:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
meeohcommented, Nov 19, 2017

I changed my package.json to this

    "scripts": {
        "dev": "razzle start",
        "build": "razzle build",
        "test": "razzle test --env=jsdom",
        "start": "NODE_ENV=production node build/server.js",
        "heroku-postbuild": "npm run build"
    },
0reactions
applgeekamcommented, Aug 7, 2020

For Laravel project, add it where ? please

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found