Skip to content

Commit 0d2fc22

Browse files
committed
fix
1 parent 1072055 commit 0d2fc22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ A preflight request uses method `OPTIONS` and has no body.
198198
199199
If the server agrees to serve the requests, then it should respond with status 200, without body.
200200
201-
- The response header `Access-Control-Allow-Method` must have the allowed method.
201+
- The response header `Access-Control-Allow-Methods` must have the allowed method.
202202
- The response header `Access-Control-Allow-Headers` must have a list of allowed headers.
203203
- Additionally, the header `Access-Control-Max-Age` may specify a number of seconds to cache the permissions. So the browser won't have to send a preflight for subsequent requests that satisfy given permissions.
204204
@@ -243,7 +243,7 @@ Access-Control-Request-Headers: Content-Type,API-Key
243243
### Step 2 (preflight response)
244244

245245
The server should respond with status 200 and headers:
246-
- `Access-Control-Allow-Method: PATCH`
246+
- `Access-Control-Allow-Methods: PATCH`
247247
- `Access-Control-Allow-Headers: Content-Type,API-Key`.
248248

249249
That would allow future communication, otherwise an error is triggered.
@@ -364,7 +364,7 @@ Additionally, if JavaScript wants no access non-simple response headers:
364364
- `Access-Control-Request-Method` has requested method.
365365
- `Access-Control-Request-Headers` lists non-simple requested headers
366366
- ← The server should respond with status 200 and headers:
367-
- `Access-Control-Allow-Method` with a list of allowed methods,
367+
- `Access-Control-Allow-Methods` with a list of allowed methods,
368368
- `Access-Control-Allow-Headers` with a list of allowed headers,
369369
- `Access-Control-Max-Age` with a number of seconds to cache permissions.
370370
- Then the actual request is sent, the previous "simple" scheme is applied.

0 commit comments

Comments
 (0)