feat: Move the path modifications around
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2024-01-06 21:38:21 +01:00
parent 40ce4e81a8
commit de14a0e68d
2 changed files with 8 additions and 8 deletions

View File

@@ -38,6 +38,14 @@ func handleSubdomain(domain, cname, path, giteaUrl, defaultCsp string, giteaClie
path = path[1:]
}
// Provide a default file.
switch {
case path == "":
path = "/index.html"
case path[len(path)-1] == '/':
path = path + "index.html"
}
repo, path, err := repo.RepoFromPath(
username,
domain,