Skip to content

Commit

Permalink
fastcgi: Some fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie committed May 12, 2020
1 parent a40da60 commit e1e3fbd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ func parsePHPFastCGI(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error
return nil, h.ArgErr()
}

// set up the transport for FastCGI, and specifically PHP
fcgiTransport := Transport{}
// set up the transport for FastCGI, and specifically PHP
fcgiTransport := Transport{}

// set up the set of file extensions allowed to execute PHP code
extensions := []string{".php"}
extensions := []string{".php"}

// set the default index file for the try_files rewrites
indexFile := "index.php"
Expand Down Expand Up @@ -197,8 +197,8 @@ func parsePHPFastCGI(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error
// set up a route list that we'll append to
routes := caddyhttp.RouteList{}

// set the list of allowed path segments on which to split
fcgiTransport.SplitPath = extensions
// set the list of allowed path segments on which to split
fcgiTransport.SplitPath = extensions

// if the index is turned off, we skip the redirect and try_files
if indexFile != "off" {
Expand Down Expand Up @@ -227,8 +227,8 @@ func parsePHPFastCGI(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error
// route to rewrite to PHP index file
rewriteMatcherSet := caddy.ModuleMap{
"file": h.JSON(fileserver.MatchFile{
TryFiles: []string{"{http.request.uri.path}", "{http.request.uri.path}/" + indexFile, indexFile},
SplitPath: extensions,
TryFiles: []string{"{http.request.uri.path}", "{http.request.uri.path}/" + indexFile, indexFile},
SplitPath: extensions,
}),
}
rewriteHandler := rewrite.Rewrite{
Expand Down

0 comments on commit e1e3fbd

Please sign in to comment.