mirror of https://github.com/fatedier/frp.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
197 B
Go
11 lines
197 B
Go
4 years ago
|
package utils
|
||
|
|
||
|
import (
|
||
|
"encoding/base64"
|
||
|
)
|
||
|
|
||
|
func BasicAuth(username, passwd string) string {
|
||
|
auth := username + ":" + passwd
|
||
|
return "Basic " + base64.StdEncoding.EncodeToString([]byte(auth))
|
||
|
}
|