liveBook · Manning

Cross-origin policy

The same-origin policy is a browser security restriction that limits scripts and documents from accessing resources associated with different origins unless explicitly permitted.

How 2 Manning books explain it

Building Web APIs with ASP.NET Core

The same-origin policy is a browser security rule that restricts scripts from accessing resources unless their protocol, host, and port origins match.

How it is used
Explains why a browser-based app needs CORS to request an API hosted on another domain.
How deep it goes
Defines origin matching and shows CORS policy configuration without detailing browser enforcement internals.
Examples
Uses an Angular app requesting a board-game API on another domain and ASP.NET Core CORS policy listings.
What you can do after
Operate/configure it in ASP.NET Core by registering a CORS policy and enabling it through middleware or endpoints.

Read how Building Web APIs with ASP.NET Core explains cross-origin policy →

ASP.NET Core in Action, 3e

The same-origin policy is a browser security restriction that limits scripts' access to resources from a different origin unless that access is explicitly permitted.

How it is used
Protects web APIs by restricting JavaScript requests from applications with different origins.
How deep it goes
Defines origin matching and demonstrates blocked URLs, then defers permission configuration to CORS.
Examples
Uses matching and mismatching example.com URLs plus a shopping site calling a separate product API.
What you can do after
Evaluate whether a JavaScript request is same-origin and recognize when CORS permission is required.

Read how ASP.NET Core in Action, 3e explains cross-origin policy →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.