Skip to content

Commit bbd9b4d

Browse files
committed
GEP-1767: fix error case of AllowHeaders field and conflicts of mkdocs.yml
1 parent c2a288a commit bbd9b4d

File tree

2 files changed

+34
-33
lines changed

2 files changed

+34
-33
lines changed

geps/gep-1767/index.md

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ type HTTPCORSFilter struct {
165165
// AllowOrigins indicates whether the response can be shared with
166166
// requested resource from the given `Origin`.
167167
//
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>)`.
170170
//
171171
// Valid values for scheme are: `http` and `https`.
172172
//
@@ -184,18 +184,18 @@ type HTTPCORSFilter struct {
184184
// left of its position.
185185
// * A wildcard by itself matches all hosts.
186186
//
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.
189189
//
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.
196196
//
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).
199199
//
200200
// Input:
201201
// Origin: https://foo.example
@@ -298,13 +298,14 @@ type HTTPCORSFilter struct {
298298
// The CORS-safelisted methods are always allowed, regardless of whether
299299
// they are specified in the `AllowMethods` field.
300300
//
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.
304304
//
305305
// If the HTTP method of the `Access-Control-Request-Method` request header
306306
// 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.
308309
//
309310
// Input:
310311
// Access-Control-Request-Method: PUT
@@ -328,16 +329,15 @@ type HTTPCORSFilter struct {
328329
// Access-Control-Allow-Methods: *
329330
//
330331
// 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`
339338
// 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.
341341
//
342342
// Input:
343343
// Access-Control-Request-Method: PUT
@@ -370,9 +370,9 @@ type HTTPCORSFilter struct {
370370
//
371371
// If any header name in the `Access-Control-Request-Headers` request header
372372
// 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.
374374
//
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
376376
// not recognize by the client, it will also occur an error on the client side.
377377
//
378378
// Input:
@@ -401,12 +401,11 @@ type HTTPCORSFilter struct {
401401
// specified with the `*` wildcard, the gateway must specify one or more
402402
// HTTP headers in the value of the `Access-Control-Allow-Headers` response
403403
// 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.
410409
//
411410
// Input:
412411
// Access-Control-Request-Headers: Content-Type, Cache-Control

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ nav:
125125
- geps/gep-91/index.md
126126
- geps/gep-1494/index.md
127127
- geps/gep-1651/index.md
128+
- geps/gep-1713/index.md
128129
- geps/gep-1767/index.md
129130
- geps/gep-1867/index.md
130131
- geps/gep-2648/index.md
131132
- geps/gep-2649/index.md
133+
- geps/gep-3388/index.md
132134
- Implementable:
133135
- geps/gep-3155/index.md
134136
- Experimental:

0 commit comments

Comments
 (0)