origin
The scheme, host and port a web page came from, such as https://app.example, which browsers use to decide what the page may access.
In more detail
Two addresses have the same origin only if all three parts match. Browsers send an Origin header on cross-origin requests, and a server that allows CORS should name the exact origins it trusts rather than every site.
Example
In the browser: Storage, cookies by default and script access are isolated per origin, and the same-origin policy stops one origin reading another's responses. Changing any one part, even http to https, makes a different origin.Related terms
- CORS — The browser rule set that decides whether web page code from one origin may read a response from a different origin.
- same-origin policy — The browser security rule that stops page code from reading responses from a different origin unless that origin allows it.
- host name — The name a computer or container calls itself on a network.
- port — A number from 1 to 65535 that picks out one service on a machine, such as 22 for SSH or 80 for plain web traffic.
- SameSite — A cookie attribute that limits whether the browser sends the cookie on requests started by other websites.
- cross-site request forgery — An attack where another website makes the victim's browser send a request to your site, and the browser's cookie makes it look genuine.
Taught in
- Remote Servers And Trust — AI Engineering: LLM Apps, RAG & Agents
- Cookies And CORS — Modern API Architecture: REST, GraphQL & gRPC
- Security Best Practices — Modern API Architecture: REST, GraphQL & gRPC
- Client Storage Paradigms: Cookies, Storage Tradeoffs — Frontend Architecture & Web Platform
- Same-Origin Policy, CORS Preflight, Credentials And Headers — Frontend Architecture & Web Platform
- Content Security Policy (CSP), Trusted Types And XSS Defenses — Frontend Architecture & Web Platform
- Session Architecture: HTTP-Only Cookies vs Tokens — Production Full-Stack Engineering
- Secure Defaults — Application Security & Threat Modeling for Engineers