Use temporary redirects
This commit is contained in:
@ -9,7 +9,7 @@ package middleware
|
||||
|
||||
// if !strings.HasPrefix(request.Protocol(), "HTTP/2") && isBrowser {
|
||||
// fmt.Println("Redirect to HTTPS")
|
||||
// ctx.Redirect(http.StatusFound, "https://" + request.Host() + request.URL().Path)
|
||||
// ctx.Redirect(http.StatusTemporaryRedirect, "https://" + request.Host() + request.URL().Path)
|
||||
// ctx.Response().WriteHeader(ctx.Status())
|
||||
// return
|
||||
// }
|
||||
|
@ -75,7 +75,7 @@ func logRequest(ctx aero.Context, responseTime time.Duration) {
|
||||
|
||||
// Log all requests that failed
|
||||
switch ctx.Status() {
|
||||
case http.StatusOK, http.StatusFound, http.StatusMovedPermanently, http.StatusPermanentRedirect, http.StatusTemporaryRedirect:
|
||||
case http.StatusOK, http.StatusTemporaryRedirect, http.StatusPermanentRedirect:
|
||||
// Ok.
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user