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

257
Views
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 answers
Answer question

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 Report
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!