Forgot to make the map

This commit is contained in:
Melon 2024-08-06 00:18:36 +01:00
parent 8aa82303ce
commit f442409ebf
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -87,6 +87,7 @@ func (s *Server) Upgrade(rw http.ResponseWriter, req *http.Request) {
// filterWebsocketHeaders allows specific headers to forward to the underlying websocket connection // filterWebsocketHeaders allows specific headers to forward to the underlying websocket connection
func filterWebsocketHeaders(headers http.Header) (out http.Header) { func filterWebsocketHeaders(headers http.Header) (out http.Header) {
out = make(http.Header)
for k, v := range headers { for k, v := range headers {
if k == "Origin" { if k == "Origin" {
out[k] = slices.Clone(v) out[k] = slices.Clone(v)