From 5ae1a5617c4bb1deef22cb3658ee581bb7dbf367 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Mon, 27 Apr 2020 16:46:46 -0400 Subject: caddyhttp: Add split_path to file matcher (used by php_fastcgi) (#3302) * matcher: Add `split_path` option to file matcher; used in php_fastcgi * matcher: Skip try_files split if not the final part of the filename * matcher: Add MatchFile tests * matcher: Clarify SplitPath godoc --- modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/caddyhttp/reverseproxy/fastcgi') diff --git a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go index 8924a6d..8a5e27e 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go @@ -149,6 +149,7 @@ func parsePHPFastCGI(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error rewriteMatcherSet := caddy.ModuleMap{ "file": h.JSON(fileserver.MatchFile{ TryFiles: []string{"{http.request.uri.path}", "{http.request.uri.path}/index.php", "index.php"}, + SplitPath: []string{".php"}, }), } rewriteHandler := rewrite.Rewrite{ -- cgit v1.2.3