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
|
```sh
|
||||||
wh.<your.domain> {
|
wh.<your.domain> {
|
||||||
@block {
|
@block {
|
||||||
not remote_ip forwarded {$WHITE_LIST}
|
not client_ip {$WHITE_LIST}
|
||||||
}
|
}
|
||||||
handle @block {
|
handle @block {
|
||||||
basicauth {
|
basicauth {
|
||||||
@ -27,20 +27,20 @@ wh.<your.domain> {
|
|||||||
header_up X-Real-IP {remote_host}
|
header_up X-Real-IP {remote_host}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
respond "IP already added! :)"
|
respond "IP bleached! :)"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Пример поддомена, доступ до которого разрешён только с IP из whitelist:
|
Пример поддомена, доступ до которого разрешён только с IP из whitelist:
|
||||||
```sh
|
```sh
|
||||||
sub.<your.domain> {
|
sub.<your.domain> {
|
||||||
@allow {
|
@block {
|
||||||
remote_ip forwarded {$WHITE_LIST}
|
not client_ip {$WHITE_LIST}
|
||||||
}
|
}
|
||||||
handle @allow {
|
handle @block {
|
||||||
reverse_proxy localhost:50001
|
redir https://wh.<your.domain>
|
||||||
}
|
}
|
||||||
respond 403
|
reverse_proxy localhost:50001
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user