Skip to content

Commit

Permalink
Add documentation for the cors-max-age annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed Jan 9, 2018
1 parent 7b8362d commit b6651fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions docs/user-guide/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit b6651fa

Please sign in to comment.