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

260
Views
Obtener errores de CORS en AWS EC2 VM, pero no en una prueba local

Escribí un código que toma datos de un sitio y me los envía a través del webhook de discord. No tuve problemas para probar el código en mi máquina local. Luego inicié una máquina virtual de AWS y cargué mi sitio allí. Ahora recibo errores de CORS que se ven así.

 OPTIONS https://discordapp.com/api/webhooks/ CORS Missing Allow Origin

y

 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://discordapp.com/api/webhooks/ (Reason: CORS header 'Access-Control-Allow-Origin' missing).

Lo que pude encontrar sobre el problema me dijo que agregara el encabezado "Acceso-Control-Permitir-Origin" y el encabezado "Acceso-Control-Permitir-Métodos". Los agregué así (usando javascript con XMLHttpRequest por cierto).

 xmlhttp.setRequestHeader("Access-Control-Allow-Origin", "*"); xmlhttp.setRequestHeader("Access-Control-Allow-Methods","*");

¿Alguien sabe una solución a este problema?

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!