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
@@ -107,11 +107,11 @@ def is_admin_path(path: str, settings: DdnsSettings) -> bool:
|
||||
def is_secret_response(request: Request) -> bool:
|
||||
path = request.url.path
|
||||
settings = request.app.state.settings
|
||||
if is_admin_path(path, settings) or path.startswith(("/m/", "/d/", "/u/")):
|
||||
if is_admin_path(path, settings) or path.startswith(("/m/", "/u/")):
|
||||
return True
|
||||
if path.startswith(("/api/v1/hostnames/", "/api/v1/domains/")):
|
||||
if path.startswith("/api/v1/hostnames/"):
|
||||
return request.method in {"POST", "DELETE"}
|
||||
return (request.method == "POST" and path in {"/magic", "/request-domain", "/verify-domain", "/accounts"}) or path == "/nic/update"
|
||||
return (request.method == "POST" and path in {"/magic", "/accounts"}) or path == "/nic/update"
|
||||
|
||||
|
||||
def is_noindex_response(request: Request) -> bool:
|
||||
@@ -120,7 +120,7 @@ def is_noindex_response(request: Request) -> bool:
|
||||
return True
|
||||
if path in {"/docs", "/redoc", "/openapi.json", "/healthz", "/ip"}:
|
||||
return True
|
||||
if path.startswith(("/api/", "/m/", "/d/", "/u/", "/nic/")):
|
||||
if path.startswith(("/api/", "/m/", "/u/", "/nic/")):
|
||||
return True
|
||||
return is_admin_path(path, request.app.state.settings)
|
||||
|
||||
@@ -154,7 +154,6 @@ def redacted_access_path(path: str) -> str:
|
||||
secret_prefixes = {
|
||||
"/u": "/u/<secret>",
|
||||
"/m": "/m/<secret>",
|
||||
"/d": "/d/<secret>",
|
||||
"/api/v1/updates": "/api/v1/updates/<secret>",
|
||||
"/api/v1/management": "/api/v1/management/<secret>",
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user