Skip to content

Commit

Permalink
Merge pull request #1141 from moonstream-to/fix-proxy-nb-headers
Browse files Browse the repository at this point in the history
Remove only access headers
  • Loading branch information
kompotkot authored Nov 20, 2024
2 parents 54c4879 + 78bac43 commit 87e73c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion nodebalancer/cmd/nodebalancer/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ func Server() {
proxyToEndpoint.ModifyResponse = func(w *http.Response) error {
// Remove proxy headers
for k := range w.Header {
w.Header.Del(k)
if k == "Access-Control-Allow-Origin" || k == "Access-Control-Allow-Methods" || k == "Access-Control-Allow-Credentials" || k == "Access-Control-Allow-Headers" {
w.Header.Del(k)
}
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion nodebalancer/cmd/nodebalancer/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

var NB_VERSION = "0.2.6"
var NB_VERSION = "0.2.7"

0 comments on commit 87e73c9

Please sign in to comment.