From 38a195c6e62dfebed3c0c642ec9e3fcc89516097 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Tue, 10 Oct 2023 14:49:08 -0600 Subject: "cmd" modifier to override CGI executable fixes #6 --- gopher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gopher.go') 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) }) } -- cgit v1.2.3