File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
web/views/@default/settings/security Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 6161 < td > 自定义客户端IP报头</ td >
6262 < td >
6363 < input type ="text " name ="clientIPHeaderNames " v-model ="config.clientIPHeaderNames "/>
64- < p class ="comment "> 可以通过此报头获取客户端IP,类似于< code-label > X-Forwarded-For</ code-label > 、 < code-label > Client-IP</ code-label > ,用于使用反向代理访问管理系统的情形;如果有多个报头可以使用空格隔开。</ p >
64+ < p class ="comment "> 可以通过此报头获取客户端IP,类似于< code-label > X-Forwarded-For X-Real-IP Client-IP </ code-label > < a href ="" > < span class =" small " @click.prevent =" addDefaultClientIPHeaderNames('X-Forwarded-For X-Real-IP Client-IP') " > [填入] </ span > </ a > ,用于使用反向代理访问管理系统的情形;如果有多个报头可以使用空格隔开。</ p >
6565 </ td >
6666 </ tr >
6767 < tr >
Original file line number Diff line number Diff line change 11Tea . context ( function ( ) {
22 this . success = NotifyReloadSuccess ( "保存成功" )
3+
4+ this . addDefaultClientIPHeaderNames = function ( headerNames ) {
5+ if ( this . config . clientIPHeaderNames == null || this . config . clientIPHeaderNames . length == 0 ) {
6+ this . config . clientIPHeaderNames = headerNames
7+ } else {
8+ this . config . clientIPHeaderNames += " " + headerNames
9+ }
10+ }
311} )
You can’t perform that action at this time.
0 commit comments