TUN-4889: Add back appendtagheaders function
TUN-4701 accidentally removed adding tagheaders. This commit adds it back.
This commit is contained in:
parent
3ef3e7a99a
commit
b6c85401a5
|
@ -76,7 +76,6 @@ func (p Protocol) TLSSettings() *TLSSettings {
|
|||
ServerName: edgeH2TLSServerName,
|
||||
}
|
||||
case QUIC:
|
||||
fmt.Println("returning this?")
|
||||
return &TLSSettings{
|
||||
ServerName: edgeQUICServerName,
|
||||
NextProtos: []string{"argotunnel"},
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue