Skip to content

Commit

Permalink
Remove only access headers
Browse files Browse the repository at this point in the history
  • Loading branch information
kompotkot committed Nov 20, 2024
1 parent 54c4879 commit 78bac43
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 78bac43

Please sign in to comment.