diff options
-rw-r--r-- | main.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -29,18 +29,18 @@ func (ep endpoint) ServeHTTP(w http.ResponseWriter, r *http.Request) { if source.Scheme != "http" && source.Scheme != "https" { w.WriteHeader(http.StatusBadRequest) - w.Write([]byte(errInvalidScheme)) + _, _ = w.Write([]byte(errInvalidScheme)) return } target, err := url.Parse(r.PostFormValue("target")) if err != nil || !ep.targetAllowed(target) { w.WriteHeader(http.StatusBadRequest) - w.Write([]byte(errTgtNotAccepted)) + _, _ = w.Write([]byte(errTgtNotAccepted)) return } if target.Scheme != "http" && target.Scheme != "https" { w.WriteHeader(http.StatusBadRequest) - w.Write([]byte(errInvalidScheme)) + _, _ = w.Write([]byte(errInvalidScheme)) return } } |