diff --git a/vpn/tunnel.go b/vpn/tunnel.go index 4ed21ab0269ad..002963ae02744 100644 --- a/vpn/tunnel.go +++ b/vpn/tunnel.go @@ -230,7 +230,7 @@ func (t *Tunnel) start(req *StartRequest) error { if apiToken == "" { return xerrors.New("missing api token") } - var header http.Header + header := make(http.Header) for _, h := range req.GetHeaders() { header.Add(h.GetName(), h.GetValue()) } diff --git a/vpn/tunnel_internal_test.go b/vpn/tunnel_internal_test.go index 0110ce58ab195..6cd18085ab302 100644 --- a/vpn/tunnel_internal_test.go +++ b/vpn/tunnel_internal_test.go @@ -100,6 +100,9 @@ func TestTunnel_StartStop(t *testing.T) { TunnelFileDescriptor: 2, CoderUrl: "https://coder.example.com", ApiToken: "fakeToken", + Headers: []*StartRequest_Header{ + {Name: "X-Test-Header", Value: "test"}, + }, }, }, }) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy