mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 13:40:24 +08:00
实现回源跟随功能
This commit is contained in:
@@ -106,6 +106,7 @@ func (this *SettingAction) RunPost(params struct {
|
|||||||
StripPrefix: reverseProxyConfig.StripPrefix,
|
StripPrefix: reverseProxyConfig.StripPrefix,
|
||||||
AutoFlush: reverseProxyConfig.AutoFlush,
|
AutoFlush: reverseProxyConfig.AutoFlush,
|
||||||
AddHeaders: reverseProxyConfig.AddHeaders,
|
AddHeaders: reverseProxyConfig.AddHeaders,
|
||||||
|
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||||
ProxyProtocolJSON: proxyProtocolJSON,
|
ProxyProtocolJSON: proxyProtocolJSON,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ func (this *SettingAction) RunPost(params struct {
|
|||||||
StripPrefix: reverseProxyConfig.StripPrefix,
|
StripPrefix: reverseProxyConfig.StripPrefix,
|
||||||
AutoFlush: reverseProxyConfig.AutoFlush,
|
AutoFlush: reverseProxyConfig.AutoFlush,
|
||||||
AddHeaders: reverseProxyConfig.AddHeaders,
|
AddHeaders: reverseProxyConfig.AddHeaders,
|
||||||
|
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||||
ProxyProtocolJSON: proxyProtocolJSON,
|
ProxyProtocolJSON: proxyProtocolJSON,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ func (this *SettingAction) RunPost(params struct {
|
|||||||
StripPrefix: reverseProxyConfig.StripPrefix,
|
StripPrefix: reverseProxyConfig.StripPrefix,
|
||||||
AutoFlush: reverseProxyConfig.AutoFlush,
|
AutoFlush: reverseProxyConfig.AutoFlush,
|
||||||
AddHeaders: reverseProxyConfig.AddHeaders,
|
AddHeaders: reverseProxyConfig.AddHeaders,
|
||||||
|
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.Success()
|
this.Success()
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ func (this *SettingAction) RunPost(params struct {
|
|||||||
StripPrefix: reverseProxyConfig.StripPrefix,
|
StripPrefix: reverseProxyConfig.StripPrefix,
|
||||||
AutoFlush: reverseProxyConfig.AutoFlush,
|
AutoFlush: reverseProxyConfig.AutoFlush,
|
||||||
AddHeaders: reverseProxyConfig.AddHeaders,
|
AddHeaders: reverseProxyConfig.AddHeaders,
|
||||||
|
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||||
ProxyProtocolJSON: proxyProtocolJSON,
|
ProxyProtocolJSON: proxyProtocolJSON,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ func (this *SettingAction) RunPost(params struct {
|
|||||||
MaxConns: types.Int32(reverseProxyConfig.MaxConns),
|
MaxConns: types.Int32(reverseProxyConfig.MaxConns),
|
||||||
MaxIdleConns: types.Int32(reverseProxyConfig.MaxIdleConns),
|
MaxIdleConns: types.Int32(reverseProxyConfig.MaxIdleConns),
|
||||||
ProxyProtocolJSON: proxyProtocolJSON,
|
ProxyProtocolJSON: proxyProtocolJSON,
|
||||||
|
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ Vue.component("reverse-proxy-box", {
|
|||||||
readTimeout: {count: 0, unit: "second"},
|
readTimeout: {count: 0, unit: "second"},
|
||||||
idleTimeout: {count: 0, unit: "second"},
|
idleTimeout: {count: 0, unit: "second"},
|
||||||
maxConns: 0,
|
maxConns: 0,
|
||||||
maxIdleConns: 0
|
maxIdleConns: 0,
|
||||||
|
followRedirects: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (reverseProxyConfig.addHeaders == null) {
|
if (reverseProxyConfig.addHeaders == null) {
|
||||||
@@ -183,6 +184,13 @@ Vue.component("reverse-proxy-box", {
|
|||||||
</tbody>
|
</tbody>
|
||||||
<more-options-tbody @change="changeAdvancedVisible" v-if="isOn()"></more-options-tbody>
|
<more-options-tbody @change="changeAdvancedVisible" v-if="isOn()"></more-options-tbody>
|
||||||
<tbody v-show="isOn() && advancedVisible">
|
<tbody v-show="isOn() && advancedVisible">
|
||||||
|
<tr v-show="family == null || family == 'http'">
|
||||||
|
<td>回源跟随</td>
|
||||||
|
<td>
|
||||||
|
<checkbox v-model="reverseProxyConfig.followRedirects"></checkbox>
|
||||||
|
<p class="comment">选中后,自动读取源站跳转后的网页内容。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr v-show="family == null || family == 'http'">
|
<tr v-show="family == null || family == 'http'">
|
||||||
<td>自动添加的Header</td>
|
<td>自动添加的Header</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user