mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
ReverseProxy: use Rewrite to replace Director (#4005)
* display go version in make * ReverseProxy: use Rewrite to replace Director
This commit is contained in:
parent
4957fd23ee
commit
518ca2ceb2
5 changed files with 10 additions and 5 deletions
|
|
@ -55,7 +55,8 @@ func NewHTTPS2HTTPSPlugin(options v1.ClientPluginOptions) (Plugin, error) {
|
|||
}
|
||||
|
||||
rp := &httputil.ReverseProxy{
|
||||
Director: func(req *http.Request) {
|
||||
Rewrite: func(r *httputil.ProxyRequest) {
|
||||
req := r.Out
|
||||
req.URL.Scheme = "https"
|
||||
req.URL.Host = p.opts.LocalAddr
|
||||
if p.opts.HostHeaderRewrite != "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue