节点中实现重写规则

This commit is contained in:
GoEdgeLab
2020-09-28 18:22:29 +08:00
parent f459632dd6
commit 43de7e4678
4 changed files with 25 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ func (this *CreatePopupAction) RunPost(params struct {
Mode string
RedirectStatus int
ProxyHost string
WithQuery bool
IsBreak bool
IsOn bool
@@ -67,6 +68,7 @@ func (this *CreatePopupAction) RunPost(params struct {
Mode: params.Mode,
RedirectStatus: types.Int32(params.RedirectStatus),
ProxyHost: params.ProxyHost,
WithQuery: params.WithQuery,
IsBreak: params.IsBreak,
IsOn: params.IsOn,
})

View File

@@ -53,6 +53,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
Mode string
RedirectStatus int
ProxyHost string
WithQuery bool
IsBreak bool
IsOn bool
@@ -81,6 +82,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
Mode: params.Mode,
RedirectStatus: types.Int32(params.RedirectStatus),
ProxyHost: params.ProxyHost,
WithQuery: params.WithQuery,
IsBreak: params.IsBreak,
IsOn: params.IsOn,
})

View File

@@ -48,11 +48,21 @@
<p class="comment">如果转发的方式为隐式而且目标URL为不同的域名时需要用到此选项用于修改被代理服务接收到的域名默认和客户端请求的主机名一致通常不必填写支持<a href="http://teaos.cn/doc/proxy/Variables.md#%E8%AF%B7%E6%B1%82%E7%9B%B8%E5%85%B3%E5%8F%98%E9%87%8F" target="_blank">请求变量</a></p>
</td>
</tr>
<tr>
<td>是否保留URL参数</td>
<td>
<div class="ui checkbox">
<input type="checkbox" name="withQuery" value="1" checked="checked"/>
<label></label>
</div>
<p class="comment">选中此选项将会把用户输入的URL中的参数部分转发到目标URL上。</p>
</td>
</tr>
<tr>
<td>是否终止往下匹配</td>
<td>
<div class="ui checkbox">
<input type="checkbox" name="isBreak" value="1" checked="checked"/>
<input type="checkbox" name="isBreak" value="1"/>
<label></label>
</div>
<p class="comment">如果选中了此选项,一旦匹配成功,不会继续匹配其他的重写规则或路径规则。</p>

View File

@@ -49,6 +49,16 @@
<p class="comment">如果转发的方式为隐式而且目标URL为不同的域名时需要用到此选项用于修改被代理服务接收到的域名默认和客户端请求的主机名一致通常不必填写支持<a href="http://teaos.cn/doc/proxy/Variables.md#%E8%AF%B7%E6%B1%82%E7%9B%B8%E5%85%B3%E5%8F%98%E9%87%8F" target="_blank">请求变量</a></p>
</td>
</tr>
<tr>
<td>是否保留URL参数</td>
<td>
<div class="ui checkbox">
<input type="checkbox" name="withQuery" value="1" v-model="rewriteRule.withQuery"/>
<label></label>
</div>
<p class="comment">选中此选项将会把用户输入的URL中的参数部分转发到目标URL上。</p>
</td>
</tr>
<tr>
<td>是否终止往下匹配</td>
<td>