Merge pull request #2794 from Manik2375/master

Adding the third header in list
This commit is contained in:
Ilya Kantor 2021-12-21 10:05:55 +03:00 committed by GitHub
commit 05336f1c0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,10 +207,11 @@ Some time ago no one could even imagine that a webpage could make such requests.
So, to avoid misunderstandings, any "unsafe" request -- that couldn't be done in the old times, the browser does not make such requests right away. First, it sends a preliminary, so-called "preflight" request, to ask for permission.
A preflight request uses the method `OPTIONS`, no body and two headers:
A preflight request uses the method `OPTIONS`, no body and three headers:
- `Access-Control-Request-Method` header has the method of the unsafe request.
- `Access-Control-Request-Headers` header provides a comma-separated list of its unsafe HTTP-headers.
- `Origin` header tells from where the request came. (such as `https://javascript.info`)
If the server agrees to serve the requests, then it should respond with empty body, status 200 and headers: