Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e51e2da

Browse files
code refactored
1 parent 2197296 commit e51e2da

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/cloudflare_middleware/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ async def path_matches_known_route(self, path: str):
188188
# NOTE: that at this stage if this request is not a get then it has already been rejected
189189
# NOTE: this will return true if there is at least one route that matches with the requested path.
190190
# otherwise it will return false and block the request
191-
return True
192-
# return any(pattern.match(path) for pattern in self.compiled_patterns)
191+
# return True
192+
return any(pattern.match(path) for pattern in self.compiled_patterns)
193193

194194
async def is_request_malicious(self, headers: dict[str, str], url: Request.url, body: str | bytes):
195195
# Check request for malicious patterns

‎src/main/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ async def monitor_servers():
399399
"""will prioritize servers which are responsive and also available"""
400400
while True:
401401
await remote_servers.sort_api_servers_by_health()
402-
await asyncio.sleep(delay=60 * 5)
402+
await asyncio.sleep(delay=60 * 30)
403403

404404
asyncio.create_task(setup_cf_firewall())
405405
asyncio.create_task(backup_cf_firewall_data())

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /