summaryrefslogtreecommitdiff
path: root/gopher.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-10-10 14:49:08 -0600
committertjpcc <tjp@ctrl-c.club>2023-10-10 16:51:24 -0600
commit38a195c6e62dfebed3c0c642ec9e3fcc89516097 (patch)
tree699dd50488c8bf948ddc8d16757eeee619a884f5 /gopher.go
parent7efb04b5d7b5c5363a8a0d95fce5513cd125ede9 (diff)
"cmd" modifier to override CGI executable
fixes #6
Diffstat (limited to 'gopher.go')
-rw-r--r--gopher.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/gopher.go b/gopher.go
index 3030bac..1c13886 100644
--- a/gopher.go
+++ b/gopher.go
@@ -57,7 +57,7 @@ func addGopherStaticRoute(router *sr.Router, route RouteDirective) {
handlers := []sr.Handler{}
if route.Modifiers.Exec {
- handlers = append(handlers, cgi.ExecGopherMaps(route.FsPath, route.URLPath, settings))
+ handlers = append(handlers, cgi.ExecGopherMaps(route.FsPath, route.URLPath, route.Modifiers.ExecCmd, settings))
}
handlers = append(handlers, fs.GopherFileHandler(route.FsPath, route.URLPath, settings))
@@ -90,7 +90,7 @@ func addGopherCGIRoute(router *sr.Router, route RouteDirective) {
}
buildAndAddRoute(router, route, func(route RouteDirective) sr.Handler {
- return cgi.GopherCGIDirectory(route.FsPath, route.URLPath, settings)
+ return cgi.GopherCGIDirectory(route.FsPath, route.URLPath, route.Modifiers.ExecCmd, settings)
})
}