mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
11 lines
197 B
Go
11 lines
197 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"encoding/base64"
|
||
|
)
|
||
|
|
||
|
func BasicAuth(username, passwd string) string {
|
||
|
auth := username + ":" + passwd
|
||
|
return "Basic " + base64.StdEncoding.EncodeToString([]byte(auth))
|
||
|
}
|