core: static sites serve a nested directory's index.html
`try_files {path} {path}/index.html /index.html` for SPA sites and the
dashboard: a URL like /docs/setup/ serves that directory's own index.html
before falling back to the root one, so a multi-page static site works at its
sub-paths while single-page apps still get client-side routing.
Found uncommitted in the checkout, author unknown, and already live: wildpc
runs from this tree, so every Caddyfile generated since used it.
This commit is contained in:
@@ -145,7 +145,7 @@ class TestAcmeMode:
|
||||
cf = generate_caddyfile_from_registry(_acme({}))
|
||||
assert "@host_wildpc host wildpc.example.com" in cf
|
||||
assert "root * /data/repos/wildpc/app/dist" in cf
|
||||
assert "try_files {path} /index.html" in cf
|
||||
assert "try_files {path} {path}/index.html /index.html" in cf
|
||||
assert "file_server" in cf
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user