diff --git a/connection/protocol.go b/connection/protocol.go index fa3b7bca..9464e62e 100644 --- a/connection/protocol.go +++ b/connection/protocol.go @@ -76,7 +76,6 @@ func (p Protocol) TLSSettings() *TLSSettings { ServerName: edgeH2TLSServerName, } case QUIC: - fmt.Println("returning this?") return &TLSSettings{ ServerName: edgeQUICServerName, NextProtos: []string{"argotunnel"}, diff --git a/connection/quic.go b/connection/quic.go index a6547d62..e22def0a 100644 --- a/connection/quic.go +++ b/connection/quic.go @@ -106,7 +106,6 @@ func (q *QUICConnection) handleStream(stream quic.Stream) error { w := newHTTPResponseAdapter(stream) return q.httpProxy.ProxyHTTP(w, req, connectRequest.Type == quicpogs.ConnectionTypeWebsocket) case quicpogs.ConnectionTypeTCP: - // TODO: This is a placeholder for testing completion. TUN-4865 will add proper TCP support. rwa := &streamReadWriteAcker{ ReadWriter: stream, } diff --git a/origin/proxy.go b/origin/proxy.go index 13fe470a..00505fe0 100644 --- a/origin/proxy.go +++ b/origin/proxy.go @@ -63,6 +63,7 @@ func (p *Proxy) ProxyHTTP( cfRay := connection.FindCfRayHeader(req) lbProbe := connection.IsLBProbeRequest(req) + p.appendTagHeaders(req) rule, ruleNum := p.ingressRules.FindMatchingRule(req.Host, req.URL.Path) logFields := logFields{ diff --git a/origin/proxy_test.go b/origin/proxy_test.go index 5c28e449..bd500793 100644 --- a/origin/proxy_test.go +++ b/origin/proxy_test.go @@ -30,7 +30,7 @@ import ( ) var ( - testTags = []tunnelpogs.Tag(nil) + testTags = []tunnelpogs.Tag{tunnelpogs.Tag{Name: "Name", Value: "value"}} unusedWarpRoutingService = (*ingress.WarpRoutingService)(nil) ) @@ -150,6 +150,9 @@ func testProxyHTTP(proxy connection.OriginProxy) func(t *testing.T) { err = proxy.ProxyHTTP(responseWriter, req, false) require.NoError(t, err) + for _, tag := range testTags { + assert.Equal(t, tag.Value, req.Header.Get(TagHeaderNamePrefix+tag.Name)) + } assert.Equal(t, http.StatusOK, responseWriter.Code) }