api: handle net/http as cli request

This commit is contained in:
Rafal Jeczalik
2016-02-23 00:02:03 +01:00
parent 16cbfb2504
commit 5cd09f5e9b
2 changed files with 4 additions and 1 deletions

View File

@ -26,7 +26,7 @@ const (
APPLICATION_JSON = "application/json"
)
var cliUserAgentExp = regexp.MustCompile("^(?i)(curl|wget|fetch\\slibfetch)\\/.*$")
var cliUserAgentExp = regexp.MustCompile(`^(?i)((curl|wget|fetch\slibfetch|Go-http-client)\/.*|Go\s1\.1\spackage\shttp)$`)
type API struct {
CORS bool