TestHTTPSRedirect - redirects HTTP to HTTPS | HTTP request to example.com/test | Redirects to https://example.com/test with 301 status |
TestHTTPSRedirect - allows HTTPS | HTTPS request with X-Forwarded-Proto header | Passes through with 200 status (no redirect) |
TestHTTPSRedirectCode | HTTP request with custom redirect code (307) | Redirects with 307 Temporary Redirect status |
TestWWWRedirect - redirects to www | Request to example.com/test | Redirects to www.example.com/test with 301 status |
TestWWWRedirect - allows www | Request to www.example.com/test | Passes through with 200 status (no redirect) |
TestNonWWWRedirect - redirects from www | Request to www.example.com/test | Redirects to example.com/test with 301 status |
TestNonWWWRedirect - allows non-www | Request to example.com/test | Passes through with 200 status (no redirect) |
TestNew - redirects matching rule | Request to /old with rule {From: "/old", To: "/new"} | Redirects to /new with 301 status |
TestNew - preserves query string | Request to /old?foo=bar | Redirects to /new?foo=bar with query preserved |
TestNew_Regex - regex redirect with capture | Request to /users/123 with pattern /users/(\d+) | Redirects to /profile/123 with captured group |
TestTrailingSlashRedirect - adds trailing slash | Request to /test without trailing slash | Redirects to /test/ with 301 status |
TestTrailingSlashRedirect - preserves query on redirect | Request to /test?a=1 | Redirects to /test/?a=1 with query preserved |
TestTrailingSlashRedirect - skips root path | Request to / (root path) | Passes through with 200 status (no redirect) |