From 713db376b50653274faf608a5fcdeb8e3b0b3c60 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Tue, 8 Apr 2025 17:50:41 +0200 Subject: [PATCH] Add login/activate paths to forgejo example template --- examples/forgejo.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/forgejo.yml b/examples/forgejo.yml index 3d0f415..2a7fb22 100644 --- a/examples/forgejo.yml +++ b/examples/forgejo.yml @@ -333,8 +333,10 @@ rules: - name: always-pow-challenge conditions: - # login paths - - 'path.startsWith("/user/sign_up") || path.startsWith("/user/login") || path.startsWith("/user/oauth2/")' + # login and sign up paths + - 'path.startsWith("/user/sign_up")' + - 'path.startsWith("/user/login") || path.startsWith("/user/oauth2/")' + - 'path.startsWith("/user/activate")' # repo / org / mirror creation paths - 'path == "/repo/create" || path == "/repo/migrate" || path == "/org/create"' # user profile info edit paths @@ -430,8 +432,8 @@ rules: conditions: - 'path.matches("^/[^/]+/[^/]+/raw/branch/")' - 'path.matches("^/[^/]+/[^/]+/archive/")' - - 'path.matches("^/[^/]+/[^/]+/media/")' - 'path.matches("^/[^/]+/[^/]+/releases/download/")' + - 'path.matches("^/[^/]+/[^/]+/media/") && ($is-generic-browser)' action: pass # Allow PUT/DELETE/PATCH/POST requests in general