Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

254
Vistas
Getting CORS errors on AWS EC2 VM, but not in a local test

I wrote some code that takes data from a site, and sends it to me over discord webhook. I had no problems testing the code on my local machine. I then started an AWS VM and uploaded my site to there. I am now Getting CORS errors that look like this.

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

and

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).

What I was able to find on the issue told me to add the "Access-Control-Allow-Origin" header and the "Access-Control-Allow-Methods" header. I added them like so (using javascript with XMLHttpRequest btw).

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

Does anyone know a solution to this problem?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda