diff options
| author | fox <fox@fakecake.org> | 2026-10-14 21:14:32 +0300 |
|---|---|---|
| committer | GitLab <noreply@fakecake.org> | 2026-10-14 21:14:32 +0300 |
| commit | c0135cc03916ad22707064e8957dce3f8e067a5d (patch) | |
| tree | 362eb039da29142b6bad295a03c56dd66255b2af | |
| parent | 680836cd0983d13eebd4209416e4747c5ba17b58 (diff) | |
| parent | af1855a81a1dc3f0838110bf4c4e394a05a36373 (diff) | |
| download | the-epube-c0135cc03916ad22707064e8957dce3f8e067a5d.tar.gz the-epube-c0135cc03916ad22707064e8957dce3f8e067a5d.tar.xz | |
Merge branch 'dev' into 'master'
forbid nginx access to dotfiles See merge request git/the-epube!76
| -rw-r--r-- | .docker/web-nginx/nginx.conf | 9 | ||||
| -rw-r--r-- | .dockerignore | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/.docker/web-nginx/nginx.conf b/.docker/web-nginx/nginx.conf index 1115616..e688a42 100644 --- a/.docker/web-nginx/nginx.conf +++ b/.docker/web-nginx/nginx.conf @@ -24,6 +24,15 @@ http { listen [::]:8080; root ${APP_WEB_ROOT}; + # Deny direct access to dotfiles/underscore-prefixed path segments: git metadata, .env, + # editor/build junk (.phpstan-tmp/, .phpunit.result.cache, __pycache__ etc.). The dev + # compose override bind-mounts the whole project directory into this container, so those + # files are otherwise servable (and .phpstan-tmp/*.php would even be passed to php-fpm); + # unanchored on purpose, ${APP_BASE} may be "" (site root) or "/tt-rss". + location ~ "/[._]" { + deny all; + } + location ${APP_BASE}/db { internal; } diff --git a/.dockerignore b/.dockerignore index fbbef82..d14b055 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,3 +13,4 @@ phpunit*xml /.phpunit* /.phpstan* /docker-compose*yml +/.env* |
