Add more logging

master
eater 5 years ago
parent 5d94a64efe
commit d324b44cf1
Signed by: eater
GPG Key ID: 656785D50BE51C0A

@ -69,6 +69,7 @@ func (it *httpServer) Start() {
err := it.verifyRequest(request, req) err := it.verifyRequest(request, req)
if err != nil { if err != nil {
log.Printf("Error on %s %s: %s", request.Method, request.URL.Path, err)
writer.WriteHeader(400) writer.WriteHeader(400)
return return
} }
@ -89,6 +90,7 @@ func (it *httpServer) Start() {
req := &DeliverCertificateRequest{} req := &DeliverCertificateRequest{}
err := it.verifyRequest(request, req) err := it.verifyRequest(request, req)
if err != nil { if err != nil {
log.Printf("Error on %s %s: %s", request.Method, request.URL.Path, err)
writer.WriteHeader(400) writer.WriteHeader(400)
return return
} }
@ -107,6 +109,7 @@ func (it *httpServer) Start() {
req := &UpdateOpenVPNConfigRequest{} req := &UpdateOpenVPNConfigRequest{}
err := it.verifyRequest(request, req) err := it.verifyRequest(request, req)
if err != nil { if err != nil {
log.Printf("Error on %s %s: %s", request.Method, request.URL.Path, err)
writer.WriteHeader(400) writer.WriteHeader(400)
return return
} }
@ -179,6 +182,8 @@ func (it *httpServer) verifyRequest(r *http.Request, v interface{}) (error) {
return err return err
} }
log.Printf("req: %s", all)
encPasswordAndIV := all[:256] encPasswordAndIV := all[:256]
encBody := all[256:] encBody := all[256:]

Loading…
Cancel
Save