diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2018-10-24 22:02:24 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2018-10-24 22:02:24 +0200 |
commit | 0271d6e5bafebad8e94056b99df0ce81f56741fb (patch) | |
tree | f4e31f841ba2dbce504d1c04e99b9f5e6b5045fd | |
parent | Add better debug info. (diff) | |
download | cgit-filters-0271d6e5bafebad8e94056b99df0ce81f56741fb.tar.gz cgit-filters-0271d6e5bafebad8e94056b99df0ce81f56741fb.tar.xz |
Add rule for free access to index page.
-rw-r--r-- | hugo-authentication.lua | 5 |
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. |