diff options
-rw-r--r-- | handler.go | 2 | ||||
-rw-r--r-- | input.go | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -127,7 +127,7 @@ func (h Handler) Handle(r gemini.Request) gemini.Response { return gemini.ErrorResponse(err) } - if isExecutable(path) { + if h.cfg.ExecuteFiles && isExecutable(path) { return h.serveExecutable(r, path) } @@ -42,6 +42,9 @@ type Config struct { // default to 5 ExecTimeout int64 `toml:"exec_timeout"` + // default to false because the content might not be trusted + ExecuteFiles bool + TLSCert string `toml:"tls_certificate"` TLSKey string `toml:"tls_key"` } |