diff --git a/gitea/gitea.go b/gitea/gitea.go index 23f4540..d95a1cc 100644 --- a/gitea/gitea.go +++ b/gitea/gitea.go @@ -68,6 +68,11 @@ func (c *Client) Open(user, path string) (fs.File, error) { filepath = "index.html" } + // If it's a dir, give them index.html + if strings.HasSuffix(filepath, "/") { + *filepath += "index.html" + } + allowed := c.allowsPages(user, repo) log.Printf("allowed? %t", allowed) if !allowed && repo != fmt.Sprintf("%s.%s", user, c.domain) {