Saltar al contenido principal
Soporte
0
Contacta con nosotros
English
Nederlands
Deutsch
Servidores dedicadosFlexible VPSTecnología de nubeUbicación compartidaDesafíos en TISectoresCareers
Cloud Compute

Con Cloud Compute, tendrás acceso a un portal desde el que podrás configurar todo tu entorno informático en cualquier momento y desde cualquier lugar del mundo.

Almacenamiento en la nube

Acceso fiable a tus archivos, infraestructura y aplicaciones en todo momento, sin interrupciones ni retrasos. En Worldstream, ofrecemos una gran variedad de soluciones de almacenamiento.

Flexible cloud icon
Nube flexible
Private cloud icon
Nube privada
Bare metal icon
Bare Metal Compute
Hollow cube icon
Almacenamiento de objetos
Hollow cube icon
Almacenamiento de archivos
Block storage icon
Almacenamiento en bloque
Backup storage icon
Almacenamiento de copias de seguridad
¿Necesitas soporte?

Con ingenieros experimentados y un tiempo medio de respuesta de 7 minutos, puedes esperar una solución de soporte técnico sólida muy rápida.

Soporte
Todos los servidores

Elige tu servidor dedicado ahora. Configuración personalizada o entrega inmediata. Servidores potentes diseñados para tu caso de uso.

Casos de uso

Sea cual sea tu caso de uso, te ayudamos a encontrar la solución adecuada.

Deal servers icon
Ofertas
AMD servers icon
Servidores AMD
AI servers icon
Servidores Intel
Hollow cube icon
Virtualización, Contenerización y Orquestación
Hollow cube icon
Sitios web y aplicaciones
Hollow cube icon
Infraestructura para gaming y streaming

Soporte 24/7/365 con un tiempo medio de respuesta de solo 7 minutos. Gracias a nuestros propios centros de datos, nuestros ingenieros pueden acceder directamente a tu servidor para ofrecer soporte rápido y directo. Contáctanos por correo o teléfono en cualquier momento.

Soporte
Externalización inteligente

Algunos aspectos de la TI crean valor añadido, mientras que otros sirven de apoyo. Aprovéchalo como punto de partida para la externalización.

Rentabilidad

Los paquetes informáticos completos pueden parecer la opción segura, pero al considerar los costes, otras opciones suelen tener más sentido.

Flexibilidad y control informáticos

Externalizar no implica perder el control; en realidad proporciona más flexibilidad y control.

Repatriación desde la nube

La nube no es el destino final: debes evaluar y ajustar tu entorno de nube continuamente a medida que cambian las necesidades.

Servicios financieros
Logística y transporte
Venta minorista y comercio electrónico
Medios de comunicación y entretenimiento
Tecnología y desarrollo de software
Seguridad
Proveedores de servicios gestionados
¿Necesitas soporte?

Con ingenieros experimentados y un tiempo medio de respuesta de 7 minutos, puedes esperar una solución de soporte técnico sólida muy rápida.

Habla con nosotrosContacta con nosotros
Acerca de WorldstreamAcerca de la tecnologíaCasosBase de conocimientos
Quiénes somosConoce al equipoTrabaja con nosotrosHazte distribuidorcertificacionesNuestros centros de datosNuestra redProtección DDoSServidores AMD EPYCPartners tecnológicosAcerca de los servidores dedicadosTodos los casosEasyTerraDutch Drone CompanyPerfGridArtículosPreguntas frecuentesNoticias y blogsProductos y servicios
Contacta con nosotros

Llama al +31 (0) 174 – 712 117 Industriestraat 53, Naaldwijk

Contacta con nosotros
Worldstream Portal
English
Nederlands
Deutsch
0
Servidores dedicadosFlexible VPSTecnología de nubeUbicación compartidaDesafíos en TISectoresCareersAcerca de WorldstreamAcerca de la tecnologíaCasosBase de conocimientosMy Worldstream
Contact
Soporte
EnglishNederlandsDeutsch
  1. InicioInicio
  2. Base de conocimientos
  3. Security
  4. CORS explained: why cross-origin requests get blocked

CORS explained: why cross-origin requests get blocked

Se aplica a Web applications, APIs, browser-based clientsAudiencia DeveloperÚltima revisión September 2026

Respuesta rápida

CORS (Cross-Origin Resource Sharing) is a browser security mechanism, not a server or firewall feature. It blocks a web page on one origin from making requests to a different origin unless that other origin explicitly allows it through response headers. If your frontend works fine when you test the API with curl but breaks in the browser console, this is almost always why.

En esta página
  • What counts as an "origin"
  • Why this exists
  • The symptom developers hit constantly
  • The fix, conceptually
  • What CORS does not protect

What counts as an "origin"

An origin is the combination of scheme, domain and port a page was loaded from. https://app.example.com and https://api.example.com are different origins even though they share a parent domain. So are http://example.com and https://example.com, because the scheme differs. Any time JavaScript running on one origin tries to call a URL on a different origin, that's a cross-origin request, and the browser gets involved.

Why this exists

Browsers enforce a same-origin policy by default: a script can freely call back to the origin it was loaded from, but calling a different origin is restricted unless that origin says it's fine. The reason is about protecting the user, not the server making the request. Without this restriction, a malicious site you visit could run JavaScript that silently sends requests to your bank, your email provider, or any other site you're logged into, riding on the session cookies your browser already holds for those sites. CORS is what stops a page you didn't intend to trust from quietly acting on your behalf against a site you do trust.

The symptom developers hit constantly

This is the pattern almost everyone runs into eventually: a frontend hosted on one domain calls an API hosted on a different domain. The API itself works perfectly when tested directly, with curl, Postman, or a REST client, because none of those are browsers and none of them enforce CORS. But the exact same request made from JavaScript in the browser fails, and the browser's console shows a CORS error rather than a network error. The request often did reach the server and the server often did respond. The browser just refused to hand that response to the page's JavaScript, because the API's server never sent back the headers needed to say "this origin is allowed to read my response".

The fix, conceptually

CORS is fixed on the server being called, not on the frontend making the call. The API needs to include an Access-Control-Allow-Origin header in its response, naming the origin (or origins) that are permitted to read that response. Depending on what the request needs to do, related headers cover which HTTP methods are allowed (Access-Control-Allow-Methods), which custom headers can be sent (Access-Control-Allow-Headers), and whether credentials like cookies can be included (Access-Control-Allow-Credentials). For anything beyond a simple GET request, the browser typically sends a preflight OPTIONS request first, asking the server to confirm the actual request would be allowed before sending it for real.

What CORS does not protect

It's worth being precise about what CORS actually is: a rule enforced by browsers, for browsers. It does nothing to stop a script, a server-to-server integration, or a tool like curl from calling an API directly, because none of those enforce the same-origin policy in the first place. An API that's meant to be publicly reachable is just as reachable with or without CORS headers set, from anything that isn't a browser reading a cross-origin response. If an API needs to restrict who can call it at all, that's a job for authentication, API keys, or IP allowlisting, not CORS.

Related articles

  • Using the Worldstream API
  • Common API automation recipes
¿Te ha resultado útil este artículo?

Informática sólida. Sin sorpresas

Tu socio para la madurez informática
Eliminamos barreras para que puedas correr
Costes previsibles y transparentes

Contacto

  • Industriestraat 53, Naaldwijk
Contacta con nosotros
Worldstream Portal (opens in a new tab)
  • Métodos de pago
  • Abuso
  • Recursos para desarrolladores
  • Centro de operaciones de red
  • Quiénes somos
  • Conoce al equipo
  • Trabaja con nosotros
  • Hazte distribuidor
  • certificaciones
  • Nuestros centros de datos
  • Nuestra red
  • Protección DDoS
  • Servidores AMD EPYC
  • Partners tecnológicos
  • Sistemas operativos
  • Vista general
  • Preguntas frecuentes
  • Casos
  • Noticias y blogs
  • Use Cases
English
Nederlands
Deutsch
English
Nederlands
Deutsch
  • Legal
  • Notificación de vulnerabilidades