Fix MTR API path: nginx rewrites diag_path prefix, backend accepts full paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ivan Razin
2026-06-24 11:20:04 +03:00
co-authored by Claude Sonnet 4.6
parent 174fee0078
commit eeae08de1a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ class Handler(BaseHTTPRequestHandler):
def do_POST(self):
parsed = urlparse(self.path)
if parsed.path not in ("/mtr", "/api/mtr"):
if not (parsed.path in ("/mtr", "/api/mtr") or parsed.path.endswith("/api/mtr")):
self._send_json(404, {"error": "not found"})
return