heather/caddy: add /files/* static file_server on iscg.dev
Для раздачи временных файлов (например v2RayTun.zip) прямой https-ссылкой. handle_path stripает /files/ prefix, file_server раздаёт из /var/www/files/. Не конфликтует с matrix (использует /_matrix/*, /.well-known/matrix).
This commit is contained in:
parent
c8f6ee04e8
commit
3d2f4172a5
1 changed files with 7 additions and 0 deletions
|
|
@ -61,6 +61,13 @@ in {
|
||||||
|
|
||||||
# Matrix tuwunel (homeserver)
|
# Matrix tuwunel (homeserver)
|
||||||
"iscg.dev".extraConfig = ''
|
"iscg.dev".extraConfig = ''
|
||||||
|
# Static file sharing (https://iscg.dev/files/<name>).
|
||||||
|
# handle_path stripает /files/ prefix → file_server ищет в root.
|
||||||
|
# Не конфликтует с matrix (использует /_matrix/*, /.well-known/matrix).
|
||||||
|
handle_path /files/* {
|
||||||
|
root * /var/www/files
|
||||||
|
file_server
|
||||||
|
}
|
||||||
reverse_proxy 127.0.0.1:8008
|
reverse_proxy 127.0.0.1:8008
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue