summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hugo-authentication.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/hugo-authentication.lua b/hugo-authentication.lua
index 6f99df5..4a56bd2 100644
--- a/hugo-authentication.lua
+++ b/hugo-authentication.lua
@@ -113,6 +113,11 @@ end
function authenticate_cookie()
printenv("Authenticate Cookie\n===================\n");
+ -- Everyone has access to the index page.
+ if os.getenv("CGIT_REPO_NAME") == nil then
+ return 1
+ end
+
-- accepted_users = protected_repos[cgit["repo"]]
if public_repos[cgit["repo"]] then
-- We return as valid if the repo is not protected.