From e2c5c28597e6a8c5e7ef48fde88f0b7d740d9586 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Thu, 28 Jan 2021 12:54:55 -0700 Subject: caddyhttp: Implement handler abort; new 'abort' directive (close #3871) (#3983) * caddyhttp: Implement handler abort; new 'abort' directive (close #3871) * Move abort directive ordering; clean up redirects Seems logical for the end-all of handlers to go at the... end. The Connection header no longer needs to be set there, since Close is true, and the static_response handler now does that. --- modules/caddyhttp/autohttps.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/caddyhttp/autohttps.go') diff --git a/modules/caddyhttp/autohttps.go b/modules/caddyhttp/autohttps.go index 9d6612f..c1d4c08 100644 --- a/modules/caddyhttp/autohttps.go +++ b/modules/caddyhttp/autohttps.go @@ -409,8 +409,7 @@ func (app *App) makeRedirRoute(redirToPort uint, matcherSet MatcherSet) Route { StaticResponse{ StatusCode: WeakString(strconv.Itoa(http.StatusPermanentRedirect)), Headers: http.Header{ - "Location": []string{redirTo}, - "Connection": []string{"close"}, + "Location": []string{redirTo}, }, Close: true, }, -- cgit v1.2.3