Cross Origin Resource Sharing Flashcards
Restricts how a document/script from one origin can interact with a resource from another origin.
Same-Origin Policy
2 web pages have the same origin if they have the same? (3)
- Protocol
- Host/Domain
- Port
A page attempting to interact with a resource from a different origin is making a __________________.
Cross-Origin Request
Same-Origin Policy is done by the _________, not by the website itself.
Browser
Browser restrict cross origin ____________ initiated within scripts.
HTTP requests.
Why restrict cross-origin access?
Cross-origin requests are a vector for online attacks.
A system that allows resources to be accessed across different origins.
Cross-Origin Resource Sharing (CORS)
The __________ headers are used by the clients and servers to determine if the client can access the server’s resources.
Access-Control-*
Some cross-origin requests trigger a ________ _________.
Preflight Request
Automatically issued by the browser before sending some kinds of cross-origin requests.
Preflight requests.
Request to check to see if the actual request will be accepted and processed.
Preflight requests.
All preflight requests are _______ HTTP requests with 3 particular headers.
- Access-Control-Request-Method
- Access-Control-Request-Headers
- Origin
In general, requests that _________________________ in the server’s data trigger a preflight request.
will cause some sort of change
___________ requests don’t trigger a preflight and only look for the Access-Control-Allow-Origin header in the response.
Simple