我正在尝试使class PageViewModel : ViewModel() {
private val _index = MutableLiveData<Int>()
val text: LiveData<String> = Transformations.map(_index) {
"Hello world from section: $it"
}
fun setIndex(index: Int) {
_index.value = index
}
}
标头值上的allow
和deny
工作。
X-Real-IP
...,但是即使server {
# ...
real_ip_header X-Real-IP;
set_real_ip_from [an-ipv6-addr];
set_real_ip_from [an-ipv4-addr];
# ...
location /foobar {
allow [an-ipv6-addr];
allow [an-ipv4-addr];
deny all;
}
}
值为/foobar
或X-Real-IP
之一,也拒绝访问[an-ipv6-addr]
(我可以通过登录{{1 }})。
[an-ipv4-addr]
是否应设置IP $http_x_real_ip
和real_ip_header
的工作地址?