]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Update cors.md - CORS max_age 600 (#1301)
authorDerek Bekoe <derek@derekbekoe.com>
Sun, 17 May 2020 10:48:02 +0000 (03:48 -0700)
committerGitHub <noreply@github.com>
Sun, 17 May 2020 10:48:02 +0000 (12:48 +0200)
Update max_age documentation from 60 to the actual default value of 600.
https://github.com/encode/starlette/blob/master/starlette/middleware/cors.py#L23

Related PR https://github.com/encode/starlette/pull/909

docs/en/docs/tutorial/cors.md

index 1ebfec3619446fec565d393494c1aecd5e0b818c..31da532e466a18d517428a9bdf07e7c5271030c6 100644 (file)
@@ -60,7 +60,7 @@ The following arguments are supported:
 * `allow_headers` - A list of HTTP request headers that should be supported for cross-origin requests. Defaults to `[]`. You can use `['*']` to allow all headers. The `Accept`, `Accept-Language`, `Content-Language` and `Content-Type` headers are always allowed for CORS requests.
 * `allow_credentials` - Indicate that cookies should be supported for cross-origin requests. Defaults to `False`.
 * `expose_headers` - Indicate any response headers that should be made accessible to the browser. Defaults to `[]`.
-* `max_age` - Sets a maximum time in seconds for browsers to cache CORS responses. Defaults to `60`.
+* `max_age` - Sets a maximum time in seconds for browsers to cache CORS responses. Defaults to `600`.
 
 The middleware responds to two particular types of HTTP request...