Skip to content

Commit

Permalink
make http-based redirects 301 (instead of 307)
Browse files Browse the repository at this point in the history
we have had this for more than 2 years and it has been fine, so let's
assume it's good now
  • Loading branch information
pixelcmtd committed Sep 16, 2022
1 parent 3f5019f commit 03d7753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redirector.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Just switch to https up there ↑
url.Scheme = "https"
url.Path = r.URL.Path
w.Header().Add("Location", url.String())
w.WriteHeader(307)
w.WriteHeader(301)
hostReqs.WithLabelValues().Inc()
}
fmt.Fprintf(w, response)
Expand Down

0 comments on commit 03d7753

Please sign in to comment.