Use temporary redirects

This commit is contained in:
2019-06-03 15:06:57 +09:00
parent e11295019b
commit cf258573a8
12 changed files with 28 additions and 23 deletions

View File

@ -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
// }

View File

@ -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: