Skip to content

Commit

Permalink
fix(middleware): adding PATCH to access control allow methods (influx…
Browse files Browse the repository at this point in the history
…data#19637)

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

* chore(changelog): added PATCH change
  • Loading branch information
russorat authored and vlastahajek committed Sep 28, 2020
1 parent 6449f2a commit c5a916a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion kit/transport/http/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5a916a

Please sign in to comment.