mirror of
https://github.com/fatedier/frp.git
synced 2025-05-11 01:18:26 +00:00
Compare commits
3 Commits
26604ecfb8
...
1cfd91cf21
Author | SHA1 | Date | |
---|---|---|---|
|
1cfd91cf21 | ||
|
f7efbfeec5 | ||
|
4991596dae |
@ -129,7 +129,7 @@ allowPorts = [
|
||||
maxPortsPerClient = 0
|
||||
|
||||
# If subDomainHost is not empty, you can set subdomain when type is http or https in frpc's configure file
|
||||
# When subdomain is est, the host used by routing is test.frps.com
|
||||
# When subdomain is test, the host used by routing is test.frps.com
|
||||
subDomainHost = "frps.com"
|
||||
|
||||
# custom 404 page for HTTP requests
|
||||
|
@ -17,6 +17,7 @@ package server
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
@ -282,7 +283,7 @@ func (svr *Service) apiProxyByTypeAndName(w http.ResponseWriter, r *http.Request
|
||||
res := GeneralResponse{Code: 200}
|
||||
params := mux.Vars(r)
|
||||
proxyType := params["type"]
|
||||
name := params["name"]
|
||||
name, _ := url.QueryUnescape(params["name"])
|
||||
|
||||
defer func() {
|
||||
log.Info("Http response [%s]: code [%d]", r.URL.Path, res.Code)
|
||||
@ -350,7 +351,7 @@ type GetProxyTrafficResp struct {
|
||||
func (svr *Service) apiProxyTraffic(w http.ResponseWriter, r *http.Request) {
|
||||
res := GeneralResponse{Code: 200}
|
||||
params := mux.Vars(r)
|
||||
name := params["name"]
|
||||
name, _ := url.QueryUnescape(params["name"])
|
||||
|
||||
defer func() {
|
||||
log.Info("Http response [%s]: code [%d]", r.URL.Path, res.Code)
|
||||
|
@ -11,7 +11,7 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const fetchData = () => {
|
||||
let url = '../api/traffic/' + props.proxyName
|
||||
let url = '../api/traffic/' + encodeURIComponent(props.proxyName)
|
||||
fetch(url, { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
|
Loading…
x
Reference in New Issue
Block a user