Add tests for serverAddressMiddleware

This commit is contained in:
Deluan 2023-03-26 13:29:57 -04:00
parent 17e0cd5504
commit 65eeb5ec1a
2 changed files with 98 additions and 2 deletions

View file

@ -164,8 +164,8 @@ func serverAddressMiddleware(h http.Handler) http.Handler {
var (
xForwardedHost = http.CanonicalHeaderKey("X-Forwarded-Host")
xForwardedProto = http.CanonicalHeaderKey("X-Forwarded-Scheme")
xForwardedScheme = http.CanonicalHeaderKey("X-Forwarded-Proto")
xForwardedProto = http.CanonicalHeaderKey("X-Forwarded-Proto")
xForwardedScheme = http.CanonicalHeaderKey("X-Forwarded-Scheme")
)
func serverAddress(r *http.Request) (scheme, host string) {