Fix baseUrl may not contain origin on web

This commit is contained in:
2023-09-16 18:22:37 +08:00
parent b1db9b452f
commit 56751e2c13

View File

@@ -89,7 +89,7 @@ bool tryInitApi(BuildContext context) {
if (_api != null) {
return true;
}
initApi("/api");
initApi("${Uri.base.origin}/api");
clearAllStates(context);
return true;
}