diff --git a/Caddyfile b/Caddyfile index fa8ef3d..ea5be75 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,6 +1,4 @@ { - order vulcain before request_header - {$CADDY_GLOBAL_OPTIONS} } diff --git a/caddy/caddy.go b/caddy/caddy.go index b638794..3a88ded 100644 --- a/caddy/caddy.go +++ b/caddy/caddy.go @@ -19,6 +19,7 @@ import ( func init() { caddy.RegisterModule(Vulcain{}) httpcaddyfile.RegisterHandlerDirective("vulcain", parseCaddyfile) + httpcaddyfile.RegisterDirectiveOrder("vulcain", "before", "request_header") } var bufPool = sync.Pool{ diff --git a/caddy/caddy_test.go b/caddy/caddy_test.go index 040859b..6a92d2c 100644 --- a/caddy/caddy_test.go +++ b/caddy/caddy_test.go @@ -11,8 +11,6 @@ func TestVulcain(t *testing.T) { tester := caddytest.NewTester(t) tester.InitServer(` { - order vulcain before request_header - skip_install_trust admin localhost:2999 http_port 9080 diff --git a/caddy/fixtures/Caddyfile b/caddy/fixtures/Caddyfile index f0a2a2f..fa61535 100644 --- a/caddy/fixtures/Caddyfile +++ b/caddy/fixtures/Caddyfile @@ -1,6 +1,5 @@ { debug - order vulcain before request_header } localhost:3000 { diff --git a/docs/gateway/caddy.md b/docs/gateway/caddy.md index 764f49a..b2f687f 100644 --- a/docs/gateway/caddy.md +++ b/docs/gateway/caddy.md @@ -37,10 +37,6 @@ Pre-built binaries are also available for download [on the releases page](https: Example configuration: ```caddyfile -{ - order vulcain before request_header -} - example.com { vulcain { openapi_file my-openapi-description.yaml # optional