Add document comments to function BasicAuthForProxy

This commit is contained in:
Endless Paradox 2024-03-12 13:22:17 +08:00 committed by GitHub
parent ab8042e9e5
commit f216ba6eaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,6 +91,7 @@ func authorizationHeader(user, password string) string {
return "Basic " + base64.StdEncoding.EncodeToString(bytesconv.StringToBytes(base))
}
// BasicAuthForProxy returns a Basic HTTP Proxy-Authorization middleware.
func BasicAuthForProxy(accounts Accounts, realm string) HandlerFunc {
if realm == "" {
realm = "Proxy Authorization Required"