fix proxy

This commit is contained in:
2026-06-23 14:29:23 +03:00
parent e241a91524
commit 0d48df9fa4
3 changed files with 4 additions and 3 deletions
Binary file not shown.
+1
View File
@@ -28,6 +28,7 @@ def index():
return resp return resp
@app.route("/rf-api/<path:rf_path>", methods=["GET", "POST"])
@app.route("/api/rf/<path:rf_path>", methods=["GET", "POST"]) @app.route("/api/rf/<path:rf_path>", methods=["GET", "POST"])
def rf_api_proxy(rf_path: str): def rf_api_proxy(rf_path: str):
target = f"{RF_API_URL}/{rf_path.lstrip('/')}" target = f"{RF_API_URL}/{rf_path.lstrip('/')}"
+3 -3
View File
@@ -2054,7 +2054,7 @@
} }
function defaultApiDebugBase() { function defaultApiDebugBase() {
return '/api/rf'; return '/rf-api';
} }
function apiDebugNumber(id, fallback = null) { function apiDebugNumber(id, fallback = null) {
@@ -2298,7 +2298,7 @@
} catch (e) { } catch (e) {
apiDebugSetStatus(`Ошибка запроса: ${e.message || e}`, true); apiDebugSetStatus(`Ошибка запроса: ${e.message || e}`, true);
apiDebugSetOutput(e.response || apiDebugSetOutput(e.response ||
'Проверьте API base URL. По умолчанию используется same-origin proxy /api/rf.'); 'Проверьте API base URL. По умолчанию используется same-origin proxy /rf-api.');
apiDebugSetSummary('Расчёт не выполнен.'); apiDebugSetSummary('Расчёт не выполнен.');
} }
} }
@@ -2406,7 +2406,7 @@
} catch (e) { } catch (e) {
apiDebugSetStatus(`Ошибка расчёта линии: ${e.message || e}`, true); apiDebugSetStatus(`Ошибка расчёта линии: ${e.message || e}`, true);
apiDebugSetOutput(e.response || apiDebugSetOutput(e.response ||
'Проверьте API base URL. По умолчанию используется same-origin proxy /api/rf.'); 'Проверьте API base URL. По умолчанию используется same-origin proxy /rf-api.');
apiDebugSetSummary('Расчёт линии не выполнен.'); apiDebugSetSummary('Расчёт линии не выполнен.');
} }
} }