generated from Grigo/AndroidTemplate
fix proxy
This commit is contained in:
Binary file not shown.
@@ -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('/')}"
|
||||||
|
|||||||
@@ -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('Расчёт линии не выполнен.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user