Edits based on feedback iliakan

This commit is contained in:
Raphael Tholl 2021-01-02 18:47:47 +01:00 committed by GitHub
parent 7a7b25a943
commit b9481da27f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -280,7 +280,7 @@ Access-Control-Max-Age: 86400
Now the browser can see that `PATCH` is in `Access-Control-Allow-Methods` and `Content-Type,API-Key` are in the list `Access-Control-Allow-Headers`, so it sends out the main request. Now the browser can see that `PATCH` is in `Access-Control-Allow-Methods` and `Content-Type,API-Key` are in the list `Access-Control-Allow-Headers`, so it sends out the main request.
If there's the header `Access-Control-Max-Age` with a number of seconds, then the preflight permissions are cached for the given time. The response above will be cached for 86400 seconds (one day). Within this timeframe, subsequent requests will not cause a preflight. Assuming that they fit the cached permissions. They will be sent directly. If there's the header `Access-Control-Max-Age` with a number of seconds, then the preflight permissions are cached for the given time. The response above will be cached for 86400 seconds (one day). Within this timeframe, subsequent requests will not cause a preflight. Assuming that they fit the cached allowances, they will be sent directly.
### Step 3 (actual request) ### Step 3 (actual request)
@ -384,4 +384,4 @@ Additionally, to grant JavaScript access to any response headers except `Cache-C
- `Access-Control-Allow-Methods` with a list of allowed methods, - `Access-Control-Allow-Methods` with a list of allowed methods,
- `Access-Control-Allow-Headers` with a list of allowed headers, - `Access-Control-Allow-Headers` with a list of allowed headers,
- `Access-Control-Max-Age` with a number of seconds to cache the permissions. - `Access-Control-Max-Age` with a number of seconds to cache the permissions.
- Then the actual request is sent and the previous "safe" scheme is applied. - Then the actual request is sent, and the previous "safe" scheme is applied.