mirror of
https://github.com/fatedier/frp.git
synced 2026-03-20 00:39:15 +08:00
fix broken server api and dashboard info (#3662)
This commit is contained in:
@@ -10,16 +10,16 @@ import ProxyView from './ProxyView.vue'
|
||||
let proxies = ref<HTTPProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
let vhost_http_port: number
|
||||
let subdomain_host: string
|
||||
let vhostHTTPPort: number
|
||||
let subdomainHost: string
|
||||
fetch('../api/serverinfo', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
vhost_http_port = json.vhost_http_port
|
||||
subdomain_host = json.subdomain_host
|
||||
if (vhost_http_port == null || vhost_http_port == 0) {
|
||||
vhostHTTPPort = json.vhostHTTPPort
|
||||
subdomainHost = json.subdomainHost
|
||||
if (vhostHTTPPort == null || vhostHTTPPort == 0) {
|
||||
return
|
||||
}
|
||||
fetch('../api/proxy/http', { credentials: 'include' })
|
||||
@@ -29,7 +29,7 @@ const fetchData = () => {
|
||||
.then((json) => {
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(
|
||||
new HTTPProxy(proxyStats, vhost_http_port, subdomain_host)
|
||||
new HTTPProxy(proxyStats, vhostHTTPPort, subdomainHost)
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user