From: Derek Bekoe Date: Sun, 17 May 2020 10:48:02 +0000 (-0700) Subject: 📝 Update cors.md - CORS max_age 600 (#1301) X-Git-Tag: 0.55.0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f93861e321da4d3e91605f46f78e99efd5405b32;p=thirdparty%2Ffastapi%2Ffastapi.git 📝 Update cors.md - CORS max_age 600 (#1301) 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 --- diff --git a/docs/en/docs/tutorial/cors.md b/docs/en/docs/tutorial/cors.md index 1ebfec3619..31da532e46 100644 --- a/docs/en/docs/tutorial/cors.md +++ b/docs/en/docs/tutorial/cors.md @@ -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...