aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index a64a620..eb30bf7 100644
--- a/main.go
+++ b/main.go
@@ -27,7 +27,7 @@ func (app *application) httpsRedirect(w http.ResponseWriter, req *http.Request)
func (app *application) wwwRedirect(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if !strings.HasPrefix(r.Host, "www.") {
- http.Redirect(w, r, r.URL.Scheme+"://www."+r.Host+r.RequestURI, 302)
+ http.Redirect(w, r, "https://www."+r.Host+r.RequestURI, 302)
return
}