@@ -165,8 +165,8 @@ type HTTPCORSFilter struct {
165
165
// AllowOrigins indicates whether the response can be shared with
166
166
// requested resource from the given `Origin`.
167
167
//
168
- // The `Origin` consists of a scheme and a host, with an optional port,
169
- // and takes the form `<scheme>://<host>(:<port>)`.
168
+ // The `Origin` consists of a scheme and a host, with an optional
169
+ // port, and takes the form `<scheme>://<host>(:<port>)`.
170
170
//
171
171
// Valid values for scheme are: `http` and `https`.
172
172
//
@@ -184,18 +184,18 @@ type HTTPCORSFilter struct {
184
184
// left of its position.
185
185
// * A wildcard by itself matches all hosts.
186
186
//
187
- // An origin value that includes _only_ the `*` character indicates
188
- // requests from all `Origin`s are allowed.
187
+ // An origin value that includes _only_ the `*` character
188
+ // indicates requests from all `Origin`s are allowed.
189
189
//
190
- // When the `AllowOrigins` field is configured with multiple origins,
191
- // it means the server supports clients from multiple origins. If the
192
- // request `Origin` matches the configured allowed origins, the gateway
193
- // must return the given `Origin` and sets value of the header
194
- // `Access-Control-Allow-Origin` same as the `Origin` header provided
195
- // by the client.
190
+ // When the `AllowOrigins` field is configured with multiple
191
+ // origins, it means the server supports clients from multiple
192
+ // origins. If the request `Origin` matches the configured
193
+ // allowed origins, the gateway must return the given `Origin`
194
+ // and sets value of the header `Access-Control-Allow-Origin`
195
+ // same as the `Origin` header provided by the client.
196
196
//
197
- // The status code of a successful response to a "preflight" request
198
- // is always an OK status (i.e., 204 or 200).
197
+ // The status code of a successful response to a "preflight"
198
+ // request is always an OK status (i.e., 204 or 200).
199
199
//
200
200
// Input:
201
201
// Origin: https://foo.example
@@ -298,13 +298,14 @@ type HTTPCORSFilter struct {
298
298
// The CORS-safelisted methods are always allowed, regardless of whether
299
299
// they are specified in the `AllowMethods` field.
300
300
//
301
- // When the `AllowMethods` field is configured with one or more methods, the
302
- // gateway must return the `Access-Control-Allow-Methods` response header which
303
- // value is present in the `AllowMethods` field.
301
+ // When the `AllowMethods` field is configured with one or more methods,
302
+ // the gateway must return the `Access-Control-Allow-Methods` response
303
+ // header which value is present in the `AllowMethods` field.
304
304
//
305
305
// If the HTTP method of the `Access-Control-Request-Method` request header
306
306
// is not included in the list of methods specified by the response header
307
- // `Access-Control-Allow-Methods`, it will present an error on the client side.
307
+ // `Access-Control-Allow-Methods`, it will present an error on the client
308
+ // side.
308
309
//
309
310
// Input:
310
311
// Access-Control-Request-Method: PUT
@@ -328,16 +329,15 @@ type HTTPCORSFilter struct {
328
329
// Access-Control-Allow-Methods: *
329
330
//
330
331
// When the `AllowCredentials` field is specified and `AllowMethods`
331
- // field specified with the `*` wildcard, the gateway must specify
332
- // one HTTP method in the value of the Access-Control-Allow-Methods
333
- // response header. The value of the header `Access-Control-Allow-Methods`
334
- // is same as the `Access-Control-Request-Method` header provided by
335
- // the client.
336
- //
337
- // If the header `Access-Control-Request-Method` is not included in
338
- // the request, the gateway will omit the `Access-Control-Allow-Methods`
332
+ // field specified with the `*` wildcard, the gateway must specify one
333
+ // HTTP method in the value of the Access-Control-Allow-Methods response
334
+ // header. The value of the header `Access-Control-Allow-Methods` is same
335
+ // as the `Access-Control-Request-Method` header provided by the client.
336
+ // If the header `Access-Control-Request-Method` is not included in the
337
+ // request, the gateway will omit the `Access-Control-Allow-Methods`
339
338
// response header, instead of specifying the `*` wildcard. A Gateway
340
- // implementation may choose to add implementation-specific default methods.
339
+ // implementation may choose to add implementation-specific default
340
+ // methods.
341
341
//
342
342
// Input:
343
343
// Access-Control-Request-Method: PUT
@@ -370,9 +370,9 @@ type HTTPCORSFilter struct {
370
370
//
371
371
// If any header name in the `Access-Control-Request-Headers` request header
372
372
// is not included in the list of header names specified by the response header
373
- // `Access-Control-Allow-Methods `, it will present an error on the client side.
373
+ // `Access-Control-Allow-Headers `, it will present an error on the client side.
374
374
//
375
- // If any header name in the `Access-Control-Allow-Methods ` response header does
375
+ // If any header name in the `Access-Control-Allow-Headers ` response header does
376
376
// not recognize by the client, it will also occur an error on the client side.
377
377
//
378
378
// Input:
@@ -401,12 +401,11 @@ type HTTPCORSFilter struct {
401
401
// specified with the `*` wildcard, the gateway must specify one or more
402
402
// HTTP headers in the value of the `Access-Control-Allow-Headers` response
403
403
// header. The value of the header `Access-Control-Allow-Headers` is same as
404
- // the `Access-Control-Request-Headers` header provided by the client.
405
- //
406
- // If the header `Access-Control-Request-Headers` is not included in
407
- // the request, the gateway will omit the `Access-Control-Allow-Headers`
408
- // response header, instead of specifying the `*` wildcard. A Gateway
409
- // implementation may choose to add implementation-specific default headers.
404
+ // the `Access-Control-Request-Headers` header provided by the client. If
405
+ // the header `Access-Control-Request-Headers` is not included in the request,
406
+ // the gateway will omit the `Access-Control-Allow-Headers` response header,
407
+ // instead of specifying the `*` wildcard. A Gateway implementation may choose
408
+ // to add implementation-specific default headers.
410
409
//
411
410
// Input:
412
411
// Access-Control-Request-Headers: Content-Type, Cache-Control
0 commit comments