Archived
Simplify DDNS flow and polish UI
This commit is contained in:
1 parent
5beee0e5c6
commit
5a90bd9d87
42 files changed
+587
-1418
No files matched your search
@@ -156,17 +156,15 @@ def is_rate_limited_path(path: str) -> bool:
|
||||
limited_paths = {
|
||||
"/magic",
|
||||
"/accounts",
|
||||
"/request-domain",
|
||||
"/verify-domain",
|
||||
"/nic/update",
|
||||
}
|
||||
return path in limited_paths or path.startswith(("/u/", "/m/", "/d/", "/api/v1/updates/")) or path.startswith(
|
||||
("/api/v1/hostnames/", "/api/v1/domains/", "/api/v1/management/")
|
||||
return path in limited_paths or path.startswith(("/u/", "/m/", "/api/v1/updates/")) or path.startswith(
|
||||
("/api/v1/hostnames/", "/api/v1/management/")
|
||||
)
|
||||
|
||||
|
||||
def rate_limit_bucket(path: str) -> str:
|
||||
for prefix in ("/u/", "/m/", "/d/", "/api/v1/updates/", "/api/v1/management/"):
|
||||
for prefix in ("/u/", "/m/", "/api/v1/updates/", "/api/v1/management/"):
|
||||
if path.startswith(prefix):
|
||||
return prefix.rstrip("/")
|
||||
return path
|
||||
|
||||
Reference in new issue
Block a user