diff options
| -rw-r--r-- | .docker/web-nginx/nginx.conf | 9 |
1 files changed, 9 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; } |
