mirror of
https://github.com/telanflow/mps.git
synced 2025-10-06 16:57:25 +08:00
A simple BasicAuth example
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user