mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-15 21:20:25 +08:00
实现回源跟随功能
This commit is contained in:
@@ -106,6 +106,7 @@ func (this *SettingAction) RunPost(params struct {
|
||||
StripPrefix: reverseProxyConfig.StripPrefix,
|
||||
AutoFlush: reverseProxyConfig.AutoFlush,
|
||||
AddHeaders: reverseProxyConfig.AddHeaders,
|
||||
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||
ProxyProtocolJSON: proxyProtocolJSON,
|
||||
})
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ func (this *SettingAction) RunPost(params struct {
|
||||
StripPrefix: reverseProxyConfig.StripPrefix,
|
||||
AutoFlush: reverseProxyConfig.AutoFlush,
|
||||
AddHeaders: reverseProxyConfig.AddHeaders,
|
||||
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||
ProxyProtocolJSON: proxyProtocolJSON,
|
||||
})
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ func (this *SettingAction) RunPost(params struct {
|
||||
StripPrefix: reverseProxyConfig.StripPrefix,
|
||||
AutoFlush: reverseProxyConfig.AutoFlush,
|
||||
AddHeaders: reverseProxyConfig.AddHeaders,
|
||||
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||
})
|
||||
|
||||
this.Success()
|
||||
|
||||
@@ -97,6 +97,7 @@ func (this *SettingAction) RunPost(params struct {
|
||||
StripPrefix: reverseProxyConfig.StripPrefix,
|
||||
AutoFlush: reverseProxyConfig.AutoFlush,
|
||||
AddHeaders: reverseProxyConfig.AddHeaders,
|
||||
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||
ProxyProtocolJSON: proxyProtocolJSON,
|
||||
})
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ func (this *SettingAction) RunPost(params struct {
|
||||
MaxConns: types.Int32(reverseProxyConfig.MaxConns),
|
||||
MaxIdleConns: types.Int32(reverseProxyConfig.MaxIdleConns),
|
||||
ProxyProtocolJSON: proxyProtocolJSON,
|
||||
FollowRedirects: reverseProxyConfig.FollowRedirects,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -23,7 +23,8 @@ Vue.component("reverse-proxy-box", {
|
||||
readTimeout: {count: 0, unit: "second"},
|
||||
idleTimeout: {count: 0, unit: "second"},
|
||||
maxConns: 0,
|
||||
maxIdleConns: 0
|
||||
maxIdleConns: 0,
|
||||
followRedirects: false
|
||||
}
|
||||
}
|
||||
if (reverseProxyConfig.addHeaders == null) {
|
||||
@@ -183,6 +184,13 @@ Vue.component("reverse-proxy-box", {
|
||||
</tbody>
|
||||
<more-options-tbody @change="changeAdvancedVisible" v-if="isOn()"></more-options-tbody>
|
||||
<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'">
|
||||
<td>自动添加的Header</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user