Refactor function names and doc comments
This commit is contained in:
parent
842a867d21
commit
d1308e6f9e
1 changed files with 7 additions and 5 deletions
12
caddyfile.go
12
caddyfile.go
|
@ -12,16 +12,18 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
httpcaddyfile.RegisterDirective("tailscale_auth", parseCaddyfileTSAuth)
|
||||
httpcaddyfile.RegisterDirective("tailscale_auth", parseCaddyfile)
|
||||
httpcaddyfile.RegisterDirectiveOrder("tailscale_auth", httpcaddyfile.After, "basic_auth")
|
||||
}
|
||||
|
||||
// parseCaddyfileTSAuth sets up the handler from Caddyfile tokens. Syntax:
|
||||
// parseCaddyfile sets up the handler from Caddyfile tokens. Syntax:
|
||||
//
|
||||
// tailscale_auth
|
||||
// tailscale_auth [set_headers]
|
||||
//
|
||||
// See also for further examples: https://github.com/caddyserver/caddy/blob/master/modules/caddyhttp/caddyauth/caddyfile.go
|
||||
func parseCaddyfileTSAuth(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) {
|
||||
// See also for further examples:
|
||||
// - https://github.com/caddyserver/caddy/blob/master/modules/caddyhttp/caddyauth/caddyfile.go
|
||||
// - https://github.com/caddyserver/caddy/blob/master/modules/caddyhttp/reverseproxy/forwardauth/caddyfile.go
|
||||
func parseCaddyfile(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) {
|
||||
h.Next() // consume directive name
|
||||
|
||||
handlers := []json.RawMessage{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue