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

231
Views
El acceso a XMLHttpRequest desde el origen 'null' ha sido bloqueado por la política CORS: No 'Access-Control-Allow-Origin'

Estoy enfrentando el siguiente problema

El acceso a XMLHttpRequest en 'http://127.0.0.1:5000/predict_home_price' desde el origen 'null' ha sido bloqueado por la política de CORS: no hay un encabezado 'Access-Control-Allow-Origin' en el recurso solicitado.

 function onClickedEstimatePrice() { console.log("Estimate price button clicked"); var sqft = document.getElementById("uiSqft"); var bhk = getBHKValue(); var bathrooms = getBathValue(); var location = document.getElementById("uiLocations"); var estPrice = document.getElementById("uiEstimatedPrice"); var url = "http://127.0.0.1:5000/predict_home_price"; //Use this if you are NOT using nginx which is first 7 tutorials //var url = "/api/predict_home_price"; // Use this if you are using nginx. ie tutorial 8 and onwards $.post(url, { total_sqft: parseFloat(sqft.value), bhk: bhk, bath: bathrooms, location: location.value }, function(data, status) { console.log(data.estimated_price); estPrice.innerHTML = "<h2>" + data.estimated_price.toString() + " Lakh</h2>"; console.log(status); }); }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

El error se explica por sí mismo ... y la pregunta es un duplicado (creo que no es el único).

No hay un encabezado 'Access-Control-Allow-Origin' en el recurso solicitado, al intentar obtener datos de una API REST

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

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!