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:
co-authored by
Claude Sonnet 4.6
parent
174fee0078
commit
eeae08de1a
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user