Skip to content

Instantly share code, notes, and snippets.

@marwan-at-work
Created July 14, 2020 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marwan-at-work/62ee954ca0dfe0bac629a78fb5a08e57 to your computer and use it in GitHub Desktop.
Save marwan-at-work/62ee954ca0dfe0bac629a78fb5a08e57 to your computer and use it in GitHub Desktop.
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