(r *http.Request)
| 391 | } |
| 392 | |
| 393 | func cliMatcher(r *http.Request) bool { |
| 394 | ua := useragent.Parse(r.UserAgent()) |
| 395 | switch ua.Product { |
| 396 | case "curl", "HTTPie", "httpie-go", "Wget", "fetch libfetch", "Go", "Go-http-client", "ddclient", "Mikrotik", "xh": |
| 397 | return true |
| 398 | } |
| 399 | return false |
| 400 | } |
| 401 | |
| 402 | type appHandler func(http.ResponseWriter, *http.Request) *appError |
| 403 |