mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +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
|
|
@ -93,16 +93,18 @@ type LogConfig struct {
|
|||
|
||||
/*
|
||||
[auth]
|
||||
authMethod = "parameters" # "header" or "parameters"
|
||||
authToken = "token"
|
||||
Method = "parameters" # "header" or "parameters"
|
||||
Key = ""
|
||||
Token = "token"
|
||||
enabled = false
|
||||
passThrough = false
|
||||
ForceAllowApi = true
|
||||
*/
|
||||
type AuthConfig struct {
|
||||
Enabled bool `toml:"enabled"`
|
||||
AuthMethod string `toml:"authMethod"`
|
||||
AuthToken string `toml:"authToken"`
|
||||
Method string `toml:"method"`
|
||||
Key string `toml:"key"`
|
||||
Token string `toml:"token"`
|
||||
PassThrough bool `toml:"passThrough"`
|
||||
ForceAllowApi bool `toml:"ForceAllowApi"`
|
||||
}
|
||||
|
|
@ -208,8 +210,9 @@ func DefaultConfig() *Config {
|
|||
},
|
||||
Auth: AuthConfig{
|
||||
Enabled: false,
|
||||
AuthMethod: "parameters",
|
||||
AuthToken: "token",
|
||||
Method: "parameters",
|
||||
Key: "",
|
||||
Token: "token",
|
||||
PassThrough: false,
|
||||
ForceAllowApi: true,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue