diff options
Diffstat (limited to 'finger.go')
| -rw-r--r-- | finger.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -61,7 +61,12 @@ func fingerHandler(route RouteDirective) sr.Handler { } if st.Mode()&5 == 5 && (route.Modifiers.Exec || route.Type == "cgi") { - buf, code, err := cgi.RunCGI(ctx, request, fpath, "/", nil) + workdir := filepath.Dir(fpath) + if route.Modifiers.ExecCmd != "" { + fpath = route.Modifiers.ExecCmd + } + + buf, code, err := cgi.RunCGI(ctx, request, fpath, "/", workdir, nil) if err != nil { return finger.Error("execution error") } |
