Origin: The scheme + host + port of the page making the request. Sent on cross-origin requests for CORS checks. The Origin header tells the server which site a request comes from: the scheme, host and port, such as https://app.example.com. Browsers add it automatically to cross-origin requests and to POST requests.
Servers use it for CORS decisions, to decide whether to allow the browser to share the response with that site. It also helps against cross-site request forgery, because a request from another origin can be rejected outright.
What should you keep in mind with Origin?
Do not treat it as authentication. Scripts and tools outside a browser can send any Origin they like. Its value is in protecting users in real browsers. When you configure CORS, compare the header against an explicit list of trusted origins. Never reflect whatever origin was sent back into Access-Control-Allow-Origin without that check.
Use when reviewing or setting HTTP response headers for a web app or API - security headers (Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy), CORS headers, caching headers (Cache-Control, ETag, Last-Modified, Vary) and cookies (Set-Cookie flags). Also use when a security scan reports missing headers.
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
'Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.'