interceptor.go 237 B

1234567891011
  1. package controllers
  2. import (
  3. "net/http"
  4. "pmail/config"
  5. )
  6. func Interceptor(w http.ResponseWriter, r *http.Request) {
  7. URL := "https://" + config.Instance.WebDomain + r.URL.Path
  8. http.Redirect(w, r, URL, http.StatusMovedPermanently)
  9. }