Reenable request logging
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2019-02-16 07:20:15 +01:00
parent a1b2ece601
commit 5a2f6b1844
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -20,6 +20,7 @@ package server
import (
"encoding/json"
"fmt"
"log"
"net/http"
"regexp"
@ -55,9 +56,10 @@ func NewMicrosubHandler(backend microsub.Microsub) http.Handler {
func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
r.ParseForm()
// log.Printf("%s %s\n", r.Method, r.URL)
// log.Println(r.URL.Query())
// log.Println(r.PostForm)
log.Printf("Incoming request: %s %s\n", r.Method, r.URL)
log.Println(r.URL.Query())
log.Println(r.PostForm)
if r.Method == http.MethodOptions {
w.Header().Add("Access-Control-Allow-Origin", "*")