Re: [go-nuts] Go API receive calls twice when hit through browser

2020-09-25 Thread Gregor Best
One of the requests is likely the browser looking for /favicon.ico. In cases like this (wondering "what are these requests?") it's usually a good idea to log things like the actual request URI used and the request method. On 25.09.20 11:30, smartaq...@gmail.com wrote: Team, Hi all, hope you

[go-nuts] Go API receive calls twice when hit through browser

2020-09-25 Thread smartaq...@gmail.com
Team, Hi all, hope you are doing good. I've made a hosted a small api on my windows 10 enterprise machine: ``` func main() { srv := &http.Server{Addr: ":8000", Handler: http.HandlerFunc(handle)} log.Fatal(srv.ListenAndServeTLS("certificate.crt", "certificate.key")) } func handle(w http.R

[go-nuts] Go API receive calls twice when hit through browser

2020-09-25 Thread smartaq...@gmail.com
Team, Hi all, hope you are doing good. I've made a small poc api on my windows 10 enterprise machine ``` func main() { srv := &http.Server{Addr: ":8000", Handler: http.HandlerFunc(handle)} log.Fatal(srv.ListenAndServeTLS("certificate.crt", "certificate.key")) } func handle(w http.Respons