Skip to content

Commit 8d0a087

Browse files
shaneuttk8s-ci-robot
authored andcommitted
docs: update godoc for new AllowCredentials
Signed-off-by: Shane Utt <[email protected]>
1 parent b8de0b8 commit 8d0a087

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

apis/v1/httproute_types.go

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,9 +1344,9 @@ type HTTPCORSFilter struct {
13441344
// Therefore, the client doesn't attempt the actual cross-origin request.
13451345
//
13461346
// The `Access-Control-Allow-Origin` response header can only use `*`
1347-
// wildcard as value when the `AllowCredentials` field is unspecified.
1347+
// wildcard as value when the `AllowCredentials` field is false or omitted.
13481348
//
1349-
// When the `AllowCredentials` field is specified and `AllowOrigins` field
1349+
// When the `AllowCredentials` field is true and `AllowOrigins` field
13501350
// specified with the `*` wildcard, the gateway must return a single origin
13511351
// in the value of the `Access-Control-Allow-Origin` response header,
13521352
// instead of specifying the `*` wildcard. The value of the header
@@ -1361,12 +1361,12 @@ type HTTPCORSFilter struct {
13611361
// AllowCredentials indicates whether the actual cross-origin request allows
13621362
// to include credentials.
13631363
//
1364-
// The only valid value for the `Access-Control-Allow-Credentials` response
1365-
// header is true (case-sensitive).
1364+
// When set to true, the gateway will include the `Access-Control-Allow-Credentials`
1365+
// response header with value true (case-sensitive).
13661366
//
1367-
// If the credentials are not allowed in cross-origin requests, the gateway
1368-
// will omit the header `Access-Control-Allow-Credentials` entirely rather
1369-
// than setting its value to false.
1367+
// When set to false or omitted the gateway will omit the header
1368+
// `Access-Control-Allow-Credentials` entirely (this is the standard CORS
1369+
// behavior).
13701370
//
13711371
// Support: Extended
13721372
//
@@ -1400,9 +1400,9 @@ type HTTPCORSFilter struct {
14001400
// side.
14011401
//
14021402
// The `Access-Control-Allow-Methods` response header can only use `*`
1403-
// wildcard as value when the `AllowCredentials` field is unspecified.
1403+
// wildcard as value when the `AllowCredentials` field is false or omitted.
14041404
//
1405-
// When the `AllowCredentials` field is specified and `AllowMethods` field
1405+
// When the `AllowCredentials` field is true and `AllowMethods` field
14061406
// specified with the `*` wildcard, the gateway must specify one HTTP method
14071407
// in the value of the Access-Control-Allow-Methods response header. The
14081408
// value of the header `Access-Control-Allow-Methods` is same as the
@@ -1442,9 +1442,9 @@ type HTTPCORSFilter struct {
14421442
//
14431443
// A wildcard indicates that the requests with all HTTP headers are allowed.
14441444
// The `Access-Control-Allow-Headers` response header can only use `*`
1445-
// wildcard as value when the `AllowCredentials` field is unspecified.
1445+
// wildcard as value when the `AllowCredentials` field is false or omitted.
14461446
//
1447-
// When the `AllowCredentials` field is specified and `AllowHeaders` field
1447+
// When the `AllowCredentials` field is true and `AllowHeaders` field
14481448
// specified with the `*` wildcard, the gateway must specify one or more
14491449
// HTTP headers in the value of the `Access-Control-Allow-Headers` response
14501450
// header. The value of the header `Access-Control-Allow-Headers` is same as
@@ -1487,8 +1487,7 @@ type HTTPCORSFilter struct {
14871487
//
14881488
// A wildcard indicates that the responses with all HTTP headers are exposed
14891489
// to clients. The `Access-Control-Expose-Headers` response header can only
1490-
// use `*` wildcard as value when the `AllowCredentials` field is
1491-
// unspecified.
1490+
// use `*` wildcard as value when the `AllowCredentials` field is false or omitted.
14921491
//
14931492
// Support: Extended
14941493
//

0 commit comments

Comments
 (0)