mirror of
https://github.com/koho/frpmgr.git
synced 2025-10-20 16:03:47 +08:00
Support response headers for proxy type http (#151)
This commit is contained in:
@ -215,6 +215,7 @@ type Proxy struct {
|
||||
HTTPPwd string `ini:"http_pwd,omitempty" http:"true" tcpmux:"true"`
|
||||
HostHeaderRewrite string `ini:"host_header_rewrite,omitempty" http:"true"`
|
||||
Headers map[string]string `ini:"-" http:"true"`
|
||||
ResponseHeaders map[string]string `ini:"-" http:"true"`
|
||||
Multiplexer string `ini:"multiplexer,omitempty" tcpmux:"true"`
|
||||
RouteByHTTPUser string `ini:"route_by_http_user,omitempty" http:"true" tcpmux:"true"`
|
||||
// "kcp" or "quic"
|
||||
|
@ -117,6 +117,7 @@ func ClientProxyFromV1(pxyCfg TypedProxyConfig) *Proxy {
|
||||
r.HostHeaderRewrite = v.HostHeaderRewrite
|
||||
r.RouteByHTTPUser = v.RouteByHTTPUser
|
||||
r.Headers = v.RequestHeaders.Set
|
||||
r.ResponseHeaders = v.ResponseHeaders.Set
|
||||
case *v1.HTTPSProxyConfig:
|
||||
r.SubDomain = v.SubDomain
|
||||
r.CustomDomains = strings.Join(v.CustomDomains, ",")
|
||||
@ -383,6 +384,9 @@ func singleClientProxyToV1(p *Proxy) (TypedProxyConfig, error) {
|
||||
RequestHeaders: v1.HeaderOperations{
|
||||
Set: p.Headers,
|
||||
},
|
||||
ResponseHeaders: v1.HeaderOperations{
|
||||
Set: p.ResponseHeaders,
|
||||
},
|
||||
RouteByHTTPUser: p.RouteByHTTPUser,
|
||||
}
|
||||
if p.CustomDomains != "" {
|
||||
|
Reference in New Issue
Block a user