Add Caddyfile directive order
This commit is contained in:
parent
828abff8d2
commit
8dc2e083f3
1 changed files with 5 additions and 1 deletions
|
@ -8,8 +8,12 @@ import (
|
||||||
"github.com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth"
|
"github.com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const directiveName = "tailscale_auth"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
httpcaddyfile.RegisterHandlerDirective("tailscale_auth", parseCaddyfile)
|
httpcaddyfile.RegisterHandlerDirective(directiveName, parseCaddyfile)
|
||||||
|
httpcaddyfile.RegisterDirectiveOrder(directiveName, httpcaddyfile.After, "basic_auth")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseCaddyfile sets up the handler from Caddyfile tokens. Syntax:
|
// parseCaddyfile sets up the handler from Caddyfile tokens. Syntax:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue