Add user/org profile to homesite rule
This commit is contained in:
@@ -382,6 +382,8 @@ rules:
|
|||||||
#- 'userAgent.contains("Twitterbot/")'
|
#- 'userAgent.contains("Twitterbot/")'
|
||||||
action: pass
|
action: pass
|
||||||
|
|
||||||
|
# Allow loading and embedding of core pages without challenges
|
||||||
|
# Extended pages like linking to files or tabs are not covered here, but might be included in other challenges
|
||||||
- name: homesite
|
- name: homesite
|
||||||
conditions:
|
conditions:
|
||||||
# Match root of site
|
# Match root of site
|
||||||
@@ -391,7 +393,11 @@ rules:
|
|||||||
# generic /*/*/ match gave too many options for scrapers to trigger random endpoints
|
# generic /*/*/ match gave too many options for scrapers to trigger random endpoints
|
||||||
# this is a negative match of endpoints that Forgejo holds as reserved as users or orgs
|
# this is a negative match of endpoints that Forgejo holds as reserved as users or orgs
|
||||||
# see https://codeberg.org/forgejo/forgejo/src/branch/forgejo/models/user/user.go#L582
|
# see https://codeberg.org/forgejo/forgejo/src/branch/forgejo/models/user/user.go#L582
|
||||||
- 'path.matches("^/[^/]+/[^/]+$") && !path.matches("(?i)^/(api|metrics|v2|assets|attachments|avatar|avatars|repo-avatars|captcha|login|org|repo|user|admin|devtest|explore|issues|pulls|milestones|notifications|ghost)/[^/]+$")'
|
- 'path.matches("^/[^/]+/[^/]+/?$") && !path.matches("(?i)^/(api|metrics|v2|assets|attachments|avatar|avatars|repo-avatars|captcha|login|org|repo|user|admin|devtest|explore|issues|pulls|milestones|notifications|ghost)/[^/]+/?$")'
|
||||||
|
|
||||||
|
# Match root of most profiles, disallowing query parameters
|
||||||
|
# this is a negative match of endpoints that Forgejo holds as reserved as users or orgs
|
||||||
|
- 'path.matches("^/[^/]+/?$") && size(query) == 0 && !path.matches("(?i)^/(api|metrics|v2|assets|attachments|avatar|avatars|repo-avatars|captcha|login|org|repo|user|admin|devtest|explore|issues|pulls|milestones|notifications|ghost)/?$")'
|
||||||
action: pass
|
action: pass
|
||||||
|
|
||||||
- name: desired-crawlers
|
- name: desired-crawlers
|
||||||
|
Reference in New Issue
Block a user