1
0
Fork 0

Make it possible to toggle handling of .molly files on and off via main config.

This commit is contained in:
Solderpunk 2020-06-29 17:17:43 +02:00
parent 77691d6983
commit 18c056167f
2 changed files with 4 additions and 1 deletions

View file

@ -16,6 +16,7 @@ type Config struct {
DefaultLang string
AccessLog string
ErrorLog string
ReadMollyFiles bool
TempRedirects map[string]string
PermRedirects map[string]string
MimeOverrides map[string]string

View file

@ -163,7 +163,9 @@ func handleGeminiRequest(conn net.Conn, config Config, accessLogEntries chan Log
}
// Read Molly files
parseMollyFiles(path, info, &config, errorLogEntries)
if config.ReadMollyFiles {
parseMollyFiles(path, info, &config, errorLogEntries)
}
// Handle directories
if info.IsDir() {