Update forgejo template
This commit is contained in:
@@ -167,7 +167,6 @@ challenges:
|
|||||||
http-method: GET
|
http-method: GET
|
||||||
http-cookie: i_like_gitea
|
http-cookie: i_like_gitea
|
||||||
http-code: 200
|
http-code: 200
|
||||||
# todo: archive value of session within token to bind it
|
|
||||||
|
|
||||||
conditions:
|
conditions:
|
||||||
# Conditions will get replaced on rules AST when found as ($condition-name)
|
# Conditions will get replaced on rules AST when found as ($condition-name)
|
||||||
@@ -209,6 +208,7 @@ conditions:
|
|||||||
is-generic-robot-ua:
|
is-generic-robot-ua:
|
||||||
- 'userAgent.contains("compatible;") && !userAgent.contains("Trident/")'
|
- 'userAgent.contains("compatible;") && !userAgent.contains("Trident/")'
|
||||||
- 'userAgent.matches("\\+https?://")'
|
- 'userAgent.matches("\\+https?://")'
|
||||||
|
- 'userAgent.contains("@")'
|
||||||
- 'userAgent.matches("[bB]ot/[0-9]")'
|
- 'userAgent.matches("[bB]ot/[0-9]")'
|
||||||
|
|
||||||
is-tool-ua:
|
is-tool-ua:
|
||||||
@@ -273,6 +273,11 @@ rules:
|
|||||||
- '($is-well-known-asset)'
|
- '($is-well-known-asset)'
|
||||||
action: pass
|
action: pass
|
||||||
|
|
||||||
|
- name: allow-static-resources
|
||||||
|
conditions:
|
||||||
|
- '($is-static-asset)'
|
||||||
|
action: pass
|
||||||
|
|
||||||
- name: undesired-networks
|
- name: undesired-networks
|
||||||
conditions:
|
conditions:
|
||||||
- 'inNetwork("huawei-cloud", remoteAddress) || inNetwork("alibaba-cloud", remoteAddress) || inNetwork("zenlayer-inc", remoteAddress)'
|
- 'inNetwork("huawei-cloud", remoteAddress) || inNetwork("alibaba-cloud", remoteAddress) || inNetwork("zenlayer-inc", remoteAddress)'
|
||||||
@@ -326,11 +331,6 @@ rules:
|
|||||||
action: check
|
action: check
|
||||||
challenges: [self-resource-load]
|
challenges: [self-resource-load]
|
||||||
|
|
||||||
- name: allow-static-resources
|
|
||||||
conditions:
|
|
||||||
- '($is-static-asset)'
|
|
||||||
action: pass
|
|
||||||
|
|
||||||
- name: always-pow-challenge
|
- name: always-pow-challenge
|
||||||
conditions:
|
conditions:
|
||||||
# login and sign up paths
|
# login and sign up paths
|
||||||
|
|||||||
Reference in New Issue
Block a user