Skip to content

Instantly share code, notes, and snippets.

@marwan-at-work
Created Jul 14, 2020
Embed
What would you like to do?
netrc issue
package main
import (
"fmt"
"net/http"
)
func main() {
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Println(r.BasicAuth())
w.WriteHeader(404)
})
http.ListenAndServeTLS(":3000", "/path/to/cert", "/path/to/key", handler)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment