A simple BasicAuth example

This commit is contained in:
telanflow
2020-08-12 18:04:43 +08:00
parent bc0ab4c045
commit 284dff7ae3
3 changed files with 76 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ func main() {
// create a http proxy server
proxy := mps.NewHttpProxy()
proxy.UseFunc(func(req *http.Request, ctx *mps.Context) (*http.Response, error) {
log.Printf("[INFO] middleware -- %s", req.URL)
log.Printf("[INFO] middleware -- %s\n", req.URL)
return ctx.Next(req)
})