mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-10 17:30:29 +08:00
网站全局设置中增加“XFF中最多地址数”选项
This commit is contained in:
@@ -110,6 +110,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
HttpAllNodeIPShowPage bool
|
HttpAllNodeIPShowPage bool
|
||||||
HttpAllEnableServerAddrVariable bool
|
HttpAllEnableServerAddrVariable bool
|
||||||
HttpAllRequestOriginsWithEncodings bool
|
HttpAllRequestOriginsWithEncodings bool
|
||||||
|
HttpAllXFFMaxAddresses int
|
||||||
|
|
||||||
HttpAllDomainAuditingIsOn bool
|
HttpAllDomainAuditingIsOn bool
|
||||||
HttpAllDomainAuditingPrompt string
|
HttpAllDomainAuditingPrompt string
|
||||||
@@ -219,6 +220,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
config.HTTPAll.LnRequestSchedulingMethod = params.HttpAllLnRequestSchedulingMethod
|
config.HTTPAll.LnRequestSchedulingMethod = params.HttpAllLnRequestSchedulingMethod
|
||||||
config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable
|
config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable
|
||||||
config.HTTPAll.RequestOriginsWithEncodings = params.HttpAllRequestOriginsWithEncodings
|
config.HTTPAll.RequestOriginsWithEncodings = params.HttpAllRequestOriginsWithEncodings
|
||||||
|
config.HTTPAll.XFFMaxAddresses = params.HttpAllXFFMaxAddresses
|
||||||
|
|
||||||
// 访问日志
|
// 访问日志
|
||||||
config.HTTPAccessLog.IsOn = params.HttpAccessLogIsOn
|
config.HTTPAccessLog.IsOn = params.HttpAccessLogIsOn
|
||||||
|
|||||||
@@ -298,6 +298,13 @@
|
|||||||
<p class="comment">选中后,表示自动使用<code-label>Accept-Encoding: gzip, ...</code-label>回源,可以用来节约源站流量。</p>
|
<p class="comment">选中后,表示自动使用<code-label>Accept-Encoding: gzip, ...</code-label>回源,可以用来节约源站流量。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>XFF中最多地址数</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="httpAllXFFMaxAddresses" v-model="config.httpAll.xffMaxAddresses"/>
|
||||||
|
<p class="comment">可以转发的X-Forwarded-For中最多的地址数,如果为0表示不限制;不要轻易修改此选项,避免无法获取真实的客户端地址。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="margin"></div>
|
<div class="margin"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user