impl authelia I think
This commit is contained in:
@@ -3,6 +3,7 @@ package config
|
||||
import (
|
||||
"fmt"
|
||||
"local/args"
|
||||
"local/logb"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -26,6 +27,7 @@ func Refresh() error {
|
||||
return err
|
||||
}
|
||||
conf = as
|
||||
logb.Set(logb.LevelFromString(as.GetString("level")))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -42,14 +44,17 @@ func parseArgs() (*args.ArgSet, error) {
|
||||
as.Append(args.INT, "ap", "alt port for always http service", 51556)
|
||||
as.Append(args.INT, "r", "rate per second for requests", 100)
|
||||
as.Append(args.INT, "b", "burst requests", 100)
|
||||
as.Append(args.BOOL, "compress", "enable compression", true)
|
||||
as.Append(args.STRING, "crt", "path to crt for ssl", "")
|
||||
as.Append(args.STRING, "key", "path to key for ssl", "")
|
||||
as.Append(args.STRING, "tcp", "address for tcp only tunnel", "")
|
||||
as.Append(args.DURATION, "timeout", "timeout for tunnel", time.Minute)
|
||||
as.Append(args.STRING, "proxy", "double-comma separated (+ if oauth)from,scheme://to.tld:port,oauth,,", "")
|
||||
as.Append(args.STRING, "proxy", "double-comma separated (+ if auth)from,scheme://to.tld:port,,", "")
|
||||
as.Append(args.STRING, "oauth", "url for boauthz", "")
|
||||
as.Append(args.STRING, "authelia", "url for authelia", "")
|
||||
as.Append(args.STRING, "cors", "json dict key:true for keys to set CORS permissive headers, like {\"from\":true}", "{}")
|
||||
as.Append(args.STRING, "nopath", "json dict key:true for keys to remove all path info from forwarded request, like -cors", "{}")
|
||||
as.Append(args.STRING, "level", "log level", "info")
|
||||
|
||||
err := as.Parse()
|
||||
return as, err
|
||||
|
||||
Reference in New Issue
Block a user