Tech

CORS (Cross-Origin Resource Sharing)

Definition

A security mechanism that allows or restricts web applications from making requests to a different domain than the one serving the web page.

Try the free calculator

Use our JSON Formatter to run the numbers yourself.

Cross-Origin Resource Sharing is a browser security feature that controls how web pages can request resources from a different domain (origin). By default, browsers block cross-origin requests to prevent malicious websites from accessing data on other domains without permission.

CORS works through HTTP headers. The server includes Access-Control-Allow-Origin headers in its response to specify which origins are permitted to access its resources. For complex requests, the browser first sends a preflight OPTIONS request to check if the actual request is allowed.

Common CORS issues occur when frontend applications try to call APIs on different domains. Solutions include configuring proper CORS headers on the server, using a proxy to route requests through the same origin, or implementing server-side API calls instead of client-side requests.

Related Calculators

Related Terms

Related Articles

Stay Updated

Get notified about new tools, features, and exclusive deals. No spam, ever.