diff options
Diffstat (limited to 'handler.go')
-rw-r--r-- | handler.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -59,9 +59,11 @@ func (h Handler) getFilePath(rawURL string) (string, error) { return itemPath, nil } - indexPath := filepath.Join(itemPath, "index.gmi") - if isFile(indexPath) { - return indexPath, nil + for _, indexFile := range h.cfg.IndexFiles { + indexPath := filepath.Join(itemPath, indexFile) + if isFile(indexPath) { + return indexPath, nil + } } return "", gemini.Error{Err: fmt.Errorf("file not found"), Status: gemini.StatusNotFound} |