Skip to content

Commit 05336f1

Browse files
authored
Merge pull request #2794 from Manik2375/master
Adding the third header in list
2 parents 1ee53e6 + 353c87d commit 05336f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

5-network/05-fetch-crossorigin/article.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,11 @@ Some time ago no one could even imagine that a webpage could make such requests.
207207

208208
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.
209209
210-
A preflight request uses the method `OPTIONS`, no body and two headers:
210+
A preflight request uses the method `OPTIONS`, no body and three headers:
211211
212212
- `Access-Control-Request-Method` header has the method of the unsafe request.
213213
- `Access-Control-Request-Headers` header provides a comma-separated list of its unsafe HTTP-headers.
214+
- `Origin` header tells from where the request came. (such as `https://javascript.info`)
214215
215216
If the server agrees to serve the requests, then it should respond with empty body, status 200 and headers:
216217

0 commit comments

Comments
 (0)