mirror of
https://github.com/go-gost/gost-ui.git
synced 2024-08-11 17:53:29 +00:00
fix: 需要auth的服务连接出错
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev": "vite --host",
|
||||
"build": "tsc && vite build",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"preview": "vite preview"
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ const Home: React.FC = () => {
|
||||
addr: value.baseURL,
|
||||
auth: {
|
||||
username: value.username,
|
||||
password: value.passowrd,
|
||||
password: value.password,
|
||||
},
|
||||
},
|
||||
value.save
|
||||
|
||||
+3
-1
@@ -57,7 +57,9 @@ export const init = async () => {
|
||||
|
||||
const verify = async (arg: GostApiConfig) => {
|
||||
const baseUrl = arg.addr.replace(/\/+$/, "");
|
||||
return axios.get(baseUrl + "/config");
|
||||
return axios.get(baseUrl + "/config", {
|
||||
auth: arg.auth
|
||||
});
|
||||
};
|
||||
|
||||
export const login = async (arg: GostApiConfig, save?: false) => {
|
||||
|
||||
Reference in New Issue
Block a user