File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import (
1515
1616// AuthUserKey is the cookie name for user credential in basic auth.
1717const AuthUserKey = "user"
18+
19+ // AuthProxyUserKey is the cookie name for proxy_user credential in basic auth for proxy.
1820const AuthProxyUserKey = "proxy_user"
1921
2022// Accounts defines a key/value for user/pass list of authorized logins.
@@ -92,6 +94,7 @@ func authorizationHeader(user, password string) string {
9294}
9395
9496// BasicAuthForProxy returns a Basic HTTP Proxy-Authorization middleware.
97+ // If the realm is empty, "Proxy Authorization Required" will be used by default.
9598func BasicAuthForProxy (accounts Accounts , realm string ) HandlerFunc {
9699 if realm == "" {
97100 realm = "Proxy Authorization Required"
You can’t perform that action at this time.
0 commit comments