From b6651fadb6773c0bef645f7c1eaacc93678b2f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rk=20S=C3=A1gi-Kaz=C3=A1r?= Date: Tue, 9 Jan 2018 01:42:05 +0100 Subject: [PATCH] Add documentation for the cors-max-age annotation --- docs/annotations.md | 1 + docs/user-guide/annotations.md | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/annotations.md b/docs/annotations.md index 5e94ed0b9..562fae40e 100644 --- a/docs/annotations.md +++ b/docs/annotations.md @@ -61,6 +61,7 @@ Key: | `cors-allow-headers` | Specifies the Headers allowed in CORS (Access-Control-Allow-Headers) | DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization | nginx | `cors-allow-methods` | Specifies the Methods allowed in CORS (Access-Control-Allow-Methods) | GET, PUT, POST, DELETE, PATCH, OPTIONS | nginx | `cors-allow-credentials` | Specifies the Access-Control-Allow-Credentials | true | nginx +| `cors-max-age` | Specifies the Access-Control-Max-Age | 1728000 | nginx ## Miscellaneous diff --git a/docs/user-guide/annotations.md b/docs/user-guide/annotations.md index ffd49ae21..eb39cc05d 100644 --- a/docs/user-guide/annotations.md +++ b/docs/user-guide/annotations.md @@ -25,6 +25,7 @@ The following annotations are supported: |[nginx.ingress.kubernetes.io/cors-allow-methods](#enable-cors)|string| |[nginx.ingress.kubernetes.io/cors-allow-headers](#enable-cors)|string| |[nginx.ingress.kubernetes.io/cors-allow-credentials](#enable-cors)|true or false| +|[nginx.ingress.kubernetes.io/cors-max-age](#enable-cors)|number| |[nginx.ingress.kubernetes.io/force-ssl-redirect](#server-side-https-enforcement-through-redirect)|true or false| |[nginx.ingress.kubernetes.io/from-to-www-redirect](#redirect-from-to-www)|true or false| |[nginx.ingress.kubernetes.io/limit-connections](#rate-limiting)|number| @@ -208,6 +209,10 @@ Example: `nginx.ingress.kubernetes.io/cors-allow-origin: "https://origin-site.co Example: `nginx.ingress.kubernetes.io/cors-allow-credentials: "true"` +* `nginx.ingress.kubernetes.io/cors-max-age` controls how long preflight requests can be cached. + +Example: `nginx.ingress.kubernetes.io/cors-max-age: 600` + For more information please check https://enable-cors.org/server_nginx.html