mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
[break] change auth config & add auth key
This commit is contained in:
parent
978ece6fa0
commit
395f641468
8 changed files with 50 additions and 27 deletions
|
|
@ -12,7 +12,7 @@ func AuthPassThrough(c *app.RequestContext, cfg *config.Config, req *http.Reques
|
|||
token := c.Query("token")
|
||||
if token != "" {
|
||||
logDebug("%s %s %s %s %s Auth-PassThrough: token %s", c.ClientIP(), c.Method(), string(c.Path()), c.UserAgent(), c.Request.Header.GetProtocol(), token)
|
||||
switch cfg.Auth.AuthMethod {
|
||||
switch cfg.Auth.Method {
|
||||
case "parameters":
|
||||
if !cfg.Auth.Enabled {
|
||||
req.Header.Set("Authorization", "token "+token)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue