Skip to main content
Support
0
Contact us
Nederlands
Deutsch
Español
Dedicated serversFlexible VPSCloud TechnologyColocationChallenges in ITSectorsCareers
Cloud Compute

With Cloud Compute, you have access anytime and anywhere to a portal through which you can configure your entire IT environment from wherever you are in the world.

Cloud Storage

Reliable access to your files, infrastructure, and applications at all times – with no interruptions or delays. At Worldstream, we offer a variety of storage solutions.

Flexible cloud icon
Flexible cloud
Private cloud icon
Private cloud
Bare metal icon
Bare Metal Compute
Hollow cube icon
Object storage
Hollow cube icon
File storage
Block storage icon
Block storage
Backup storage icon
Backup storage
Need support?

With experienced engineers and an average response time track record on 7 minutes, you can expect a solid technical support solution in next to no time.

All Servers

Choose your Dedicated Server now. Custom or Instant Delivery. Powerhouse servers built for your use case.

Use Cases

Whatever your use case, we’re here to help you find the ideal solution.

Deal servers icon
Deals
AMD servers icon
AMD Processors
AI servers icon
Intel Processors
Hollow cube icon
Virtualisation, Containerisation and Orchestration
Hollow cube icon
Websites and Applications
Hollow cube icon
Gaming and Streaming Infrastructure

24/7/365 support with an average response time of just 7 minutes. Thanks to our own data centers, our engineers can go directly to your server for fast, hands-on assistance. Email or call us anytime.

Smart outsourcing

Some IT creates added value, while other types are supportive. Use that as a starting point for outsourcing.

Cost Efficiency

Complete IT packages may seem like the safe option, but when you consider the costs, other choices often make more sense.

IT flexibility & control

Outsourcing doesn’t mean losing control; it actually provides more flexibility and control.

Cloud repatriation

The cloud is not a final destination: You should continuously evaluate and adjust your cloud environment as needs evolve.

Financial services
Logistics & Transportation
Retail & E-commerce
Media & Entertainment
Tech & Software Development
Security
Managed Service Providers
Need support?

With experienced engineers and an average response time track record on 7 minutes, you can expect a solid technical support solution in next to no time.

Chat with usContact us
About WorldstreamAbout the technologyCasesKnowledge base
About usMeet the teamJobsBecome a resellerCertificationsOur data centersOur networkDDoS ProtectionAMD EPYC serversTechnology PartnersOperating SystemsAll casesEasyTerraDutch Drone CompanyPerfGridArticlesFAQNews and BlogsProducts and Services
Contact us

Call +31 (0) 174 – 712 117

Industriestraat 53, Naaldwijk

Nederlands
Deutsch
Español
0
Dedicated serversFlexible VPSCloud TechnologyColocationChallenges in ITSectorsCareersAbout WorldstreamAbout the technologyCasesKnowledge baseMy Worldstream
Contact
Support
NederlandsDeutschEspañol
  1. HomeHome
  2. Knowledge Base
  3. Security
  4. CORS explained: why cross-origin requests get blocked

CORS explained: why cross-origin requests get blocked

Applies to Web applications, APIs, browser-based clientsAudience DeveloperLast reviewed September 2026

Quick answer

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.

On this page
  • 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
Was this article helpful?

Solid IT. No Surprises

Sparring partner for IT maturity
Eliminating barriers so you can run
Predictable and transparant costs

Contact

  • Industriestraat 53, Naaldwijk
  • Payment Methods
  • Abuse
  • Developers Resources
  • Network Operations Center
  • About us
  • Meet the team
  • Jobs
  • Become a reseller
  • Certifications
  • Our data centers
  • Our network
  • DDoS Protection
  • AMD EPYC servers
  • Technology Partners
  • Operating Systems
  • Overview
  • FAQ
  • Cases
  • News & Blogs
  • Use Cases
Nederlands
Deutsch
Español
Nederlands
Deutsch
Español
  • Legal
  • Disclosure