mirror of
https://github.com/fruworg/fruworg.github.io.git
synced 2024-11-16 09:27:17 +03:00
Update envip.md
This commit is contained in:
parent
973229c88d
commit
866c950a41
@ -17,7 +17,7 @@ tags: [linux, caddy]
|
||||
```sh
|
||||
wh.<your.domain> {
|
||||
@block {
|
||||
not remote_ip forwarded {$WHITE_LIST}
|
||||
not client_ip {$WHITE_LIST}
|
||||
}
|
||||
handle @block {
|
||||
basicauth {
|
||||
@ -27,20 +27,20 @@ wh.<your.domain> {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
}
|
||||
respond "IP already added! :)"
|
||||
respond "IP bleached! :)"
|
||||
}
|
||||
```
|
||||
|
||||
Пример поддомена, доступ до которого разрешён только с IP из whitelist:
|
||||
```sh
|
||||
sub.<your.domain> {
|
||||
@allow {
|
||||
remote_ip forwarded {$WHITE_LIST}
|
||||
@block {
|
||||
not client_ip {$WHITE_LIST}
|
||||
}
|
||||
handle @allow {
|
||||
reverse_proxy localhost:50001
|
||||
handle @block {
|
||||
redir https://wh.<your.domain>
|
||||
}
|
||||
respond 403
|
||||
reverse_proxy localhost:50001
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user