Sfoglia il codice sorgente

signature check for all requests

master
Patrick Peng Sun 8 anni fa
parent
commit
256ac67577
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      server.go

+ 4
- 0
server.go Vedi File

// //
func apiV1Main(w http.ResponseWriter, r *http.Request) { func apiV1Main(w http.ResponseWriter, r *http.Request) {
logRequestDebug(httputil.DumpRequest(r, true)) logRequestDebug(httputil.DumpRequest(r, true))
if checkSignature(r) == false {
fmt.Fprintf(w, "") //empty string
return
}


switch r.Method { switch r.Method {
case "POST": case "POST":

Loading…
Annulla
Salva