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

259
Visualizações
single html page on disk request for localhost CORS error

everyone: I am a beginner on fort-end, create a single html file on disk.For example,"D:/index.html". Then I start a node.js server。

Run the node.js server, and open the browser on page of "index.html", CORS error occur. I know add js code " res.setHeader( "Access-Control-Allow-Origin", "*" );" on node.js server, it can avoid CORS error. My question is "single html page located on disk, I think it also come from localhost, why request to localhost server can trigger CORS???"

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

when we say the same origin the port, protocol, and the host should be the same for both. please check https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy

about 4 years ago · Juan Pablo Isaza Relatório
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