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

202
Views
El acceso a XMLHttpRequest en "ALGUNA-URL" desde el origen 'localhost' ha sido bloqueado por la política de CORS. El redireccionamiento no está permitido para una solicitud de verificación previa

Estoy codificando una aplicación Vue.js. Creé una API usando python y la alojé usando Heroku. Pero cada vez que intento obtener JSON de esta API, hay un error. Lo probé en otra API (Google Dictionary API: 'https://api.dictionaryapi.dev/api/v2/entries/en/hello'), y funciona bien.

Aquí está el código:

 methods: { calculate() { // Use this API call: // http://gpt3-model.herokuapp.com/api/type=text-ada-001/prompt=<code>/ const url = 'https://gpt3-model.herokuapp.com/api/type=text-ada-001/prompt=' + this.code; axios.get(url, { headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Access-Control-Allow-Origin': 'http://localhost:8080/', } }) .then(response => { console.log(response.data); this.complexity = response.data; }) .catch(error => { console.log(error); }); } }

Este es el error que recibo: Acceso a XMLHttpRequest en 'https://gpt3-model.herokuapp.com/api/type=text-ada-001/prompt=hi,%20how%20are%20you?/' desde el origen 'http://localhost:8080' ha sido bloqueado por la política de CORS: la respuesta a la solicitud de verificación previa no pasa la verificación de control de acceso: el redireccionamiento no está permitido para una solicitud de verificación previa.

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