Selaa lähdekoodia

unauthorized request is turned down if without signature

master
Patrick Peng Sun 9 vuotta sitten
vanhempi
commit
8fb44b6acf
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. +1
    -0
      server.go

+ 1
- 0
server.go Näytä tiedosto

logRequestDebug(httputil.DumpRequest(r, true)) logRequestDebug(httputil.DumpRequest(r, true))
if checkSignature(r) == false { if checkSignature(r) == false {
log.Println("signature of URL incorrect") log.Println("signature of URL incorrect")
w.WriteHeader(http.StatusUnauthorized)
fmt.Fprintf(w, "") //empty string fmt.Fprintf(w, "") //empty string
return return
} }

Loading…
Peruuta
Tallenna