Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
Request to get index_bundle.js from server fails because SSL is not set up

I have a web app consisting of a React.js front end and an Express.js back-end server which listens to incoming requests on port 7000. I'm using Nginx on my Ubuntu server to route my domain (let's call it example.com) to the javascript server process.

When I go to http://example.com in the browser The HTML document of the homepage is returned successfully, but when trying to get index_bundle.js or favicon.ico the requests fail (getting net::ERR_CONNECTION_REFUSED) because they use HTTPS instead of HTTP (of course I will set up SSL when deploying to production, but this is a testing server).

For example, the script tag which tries to get the main bundle script looks as follows: <script defer="defer" src="index_bundle.js">. As you can see, it's a simple relative path to the script on the server, but the request URL appears as https://example.com/index_bundle.js even though the original request in the browser explicitly used http://.

Is there a way to make the app use the non secure version of http as long as I'm using the testing environment? Am I doing something wrong?

My Nginx configuration file: (etc\nginx\sites-available\default):

server {
    return 404;
}

server {

    listen 80;
    server_name example.com;
    location / {
        proxy_set_header Host $host;
        proxy_pass http://127.0.0.1:7000;
        proxy_redirect off;
    }
}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!