From dc92b75250d4608d7d047ad94944f7922218964a Mon Sep 17 00:00:00 2001 From: Stavros Date: Mon, 10 Aug 2026 21:01:13 +0300 Subject: [PATCH] fix: rabbit comments --- internal/controller/proxy_controller_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/controller/proxy_controller_test.go b/internal/controller/proxy_controller_test.go index 0e6a75e1..4d2e23a3 100644 --- a/internal/controller/proxy_controller_test.go +++ b/internal/controller/proxy_controller_test.go @@ -102,13 +102,13 @@ func TestProxyController(t *testing.T) { req := httptest.NewRequest("GET", "/api/auth/traefik", nil) req.Header.Set("x-forwarded-host", "test.example.com") req.Header.Set("x-forwarded-proto", "https") - req.Header.Set("x-forwarded-uri", "/?foo=bar") + req.Header.Set("x-forwarded-uri", "/search?foo=bar") req.Header.Set("user-agent", browserUserAgent) router.ServeHTTP(recorder, req) assert.Equal(t, http.StatusFound, recorder.Code) location := recorder.Header().Get("Location") - assert.Contains(t, location, url.QueryEscape("https://test.example.com/?foo=bar")) + assert.Contains(t, location, url.QueryEscape("https://test.example.com/search?foo=bar")) assert.Contains(t, location, "login_for=app") assert.Contains(t, location, "https://tinyauth.example.com/login") }, @@ -118,11 +118,11 @@ func TestProxyController(t *testing.T) { middlewares: []gin.HandlerFunc{}, run: func(t *testing.T, router *gin.Engine, recorder *httptest.ResponseRecorder) { req := httptest.NewRequest("GET", "/api/auth/nginx", nil) - req.Header.Set("x-original-url", "https://test.example.com/?foo=bar") + req.Header.Set("x-original-url", "https://test.example.com/search?foo=bar") router.ServeHTTP(recorder, req) assert.Equal(t, http.StatusUnauthorized, recorder.Code) location := recorder.Header().Get("x-tinyauth-location") - assert.Contains(t, location, url.QueryEscape("https://test.example.com/?foo=bar")) + assert.Contains(t, location, url.QueryEscape("https://test.example.com/search?foo=bar")) assert.Contains(t, location, "login_for=app") assert.Contains(t, location, "https://tinyauth.example.com/login") },