Updated Nginx (markdown)

oooo-ps 2025-08-10 03:31:35 +03:00
parent e370164867
commit c65fe187aa

@ -41,4 +41,27 @@ server {
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
} }
```
## Restrict
> [!NOTE]
> Direct access to the following files is safe and is also already restricted by the Rocket framework implementation (as unexpected by the application logic). Therefore, feel free to further restrict direct access on the Nginx side.
**Restrict direct access to the torrent files**
```
location ~* \.torrent$ {
deny all;
}
```
**Restrict direct access to hidden files (started with dot)**
Hidden files are temporarily created filesystem offsets by the `aquatic-crawler` and its `librqbit` client on the data preload. Permanent files are moved to folders without a dot. There is no reason to access this location.
```
location ~* ^/\. {
deny all;
}
``` ```