Pull request: home: improve mobileconfig http api

Merge in DNS/adguard-home from 2358-mobileconfig to master

Updates .

Squashed commit of the following:

commit ab3c7a75ae21f6978904f2dc237cb84cbedff7ab
Merge: fa002e400 b4a35fa88
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Nov 25 16:11:06 2020 +0300

    Merge branch 'master' into 2358-mobileconfig

commit fa002e40004656db08d32c926892c6c820fb1338
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Nov 25 15:19:00 2020 +0300

    home: improve mobileconfig http api
This commit is contained in:
Ainar Garipov 2020-11-25 18:09:41 +03:00
parent b4a35fa887
commit 96e83a133f
7 changed files with 217 additions and 47 deletions
internal/home

View file

@ -683,3 +683,12 @@ func getHTTPProxy(req *http.Request) (*url.URL, error) {
}
return url.Parse(config.ProxyURL)
}
// jsonError is a generic JSON error response.
//
// TODO(a.garipov): Merge together with the implementations in .../dhcpd and
// other packages after refactoring the web handler registering.
type jsonError struct {
// Message is the error message, an opaque string.
Message string `json:"message"`
}