fix(middleware): adding PATCH to access control allow methods (#19637)

* fix(middleware): adding PATCH to access control allow methods

* chore(changelog): added PATCH change
pull/19640/head
Russ Savage 2020-09-24 11:49:00 -07:00 committed by GitHub
parent e405398ac1
commit bc4bae3738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -43,6 +43,7 @@ need to update any InfluxDB CLI config profiles with the new port number.
1. [19392](https://github.com/influxdata/influxdb/pull/19392): Include the edge of the boundary we are observing.
1. [19453](https://github.com/influxdata/influxdb/pull/19453): Warn about duplicate tag names during influx write csv.
1. [19466](https://github.com/influxdata/influxdb/pull/19466): Do not override existing line part in group annotation.
1. [19637](https://github.com/influxdata/influxdb/pull/19637): Added PATCH to the list of allowed methods
## v2.0.0-beta.16 [2020-08-07]

View File

@ -26,7 +26,7 @@ func SetCORS(next http.Handler) http.Handler {
}
if r.Method == http.MethodOptions {
// allow and stop processing in pre-flight requests
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, PATCH")
w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length, Accept-Encoding, Authorization, User-Agent")
w.WriteHeader(http.StatusNoContent)
return