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

176
Vistas
If JavaScript Served From Site-A, Issues a POST to Site-B, Will this Cause a CORS Violation?

I'm trying to make certain I understand SOP/CORS policy. The particular scenario I'm interested in is:

An HMTL page and JavaScript are served from domain company-one.com. However, the JavaScript code will issue a POST to domain company-two.com.

First assumption: I think the POST will fail due to origin policy. Is this correct?

Second assumption: If I setup an access control header (Acccess-Control-Allow-Origin: company-one.com) on the company-two.com server, the POST will work. Is this correct?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

  1. The POST will fail, but keep in mind JavaScript fetch/AJAX is not the only way to make POST requests. Even without an Access-Control-Allow-Origin, company-one.com can still make (and automatically submit) a form that would cause a POST request to company-two.com, possibly with the user's cookie.

  2. Yes. Also consider adding Access-Control-Allow-Methods: POST, OPTIONS

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