Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

210
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda