Fix /health endpoint: wrap file_server in handle block
try_files is a rewriter that runs before handlers in Caddy's directive order, rewriting /health to /index.html before handle /health matches. Wrapping try_files + file_server in a catch-all handle block makes it mutually exclusive with handle /health.
This commit is contained in:
parent
9c9b69c733
commit
bf330d7310
1 changed files with 4 additions and 2 deletions
|
|
@ -6,6 +6,8 @@
|
||||||
respond "ok" 200
|
respond "ok" 200
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handle {
|
||||||
try_files {path} {path}/index.html {path}/ /index.html
|
try_files {path} {path}/index.html {path}/ /index.html
|
||||||
file_server
|
file_server
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue