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

392
Views
¿Cómo resolver 'La redirección ha sido bloqueada por la política CORS: No hay encabezado 'Access-Control-Allow-Origin''?

Estoy trabajando en una aplicación usando Vue js . De acuerdo con mi configuración, necesito pasar a una variable a mi URL al configurar el cambio.

 <!-- language: lang-js --> $.get('http://172.16.1.157:8002/firstcolumn/' + c1v + '/' + c1b, function (data) { // some code... });

Pero cuando mi aplicación llega a la URL, muestra el siguiente mensaje.

 Failed to load http://172.16.1.157:8002/firstcolumn/2017-03-01/2017-10-26: Redirect from 'http://172.16.1.157:8002/firstcolumn/2017-03-01/2017-10-26' to 'http://172.16.1.157:8002/firstcolumn/2017-03-01/2017-10-26/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Además de lo que awd mencionó acerca de hacer que la persona responsable del servidor se reconfigure (una solución poco práctica para el desarrollo local), utilizo un complemento de Chrome de cambio de origen como este:

Cambiador Moesif Orign y CORS

Puede hacer que su local dev server (ex: localhost:8080) parezca que proviene de 172.16.1.157:8002 or any other domain .

over 4 years ago · Santiago Trujillo Report

0

Gracias a todos, lo resolví con esta extensión en Chrome.

Permitir CORS: Acceso-Control-Permitir-Origen

over 4 years ago · Santiago Trujillo Report

0

Si tiene control sobre su servidor, puede usar PHP:

 <?PHP header('Access-Control-Allow-Origin: *'); ?>
over 4 years ago · Santiago Trujillo 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!