Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

258
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda