Update default.conf.sample to deny dotfile access#73
Conversation
Signed-off-by: Eric Nemchik <eric@nemchik.com>
There was a problem hiding this comment.
Pull request overview
Updates the default nginx site configuration sample to block access to dotfiles while still permitting access to /.well-known (commonly needed for ACME challenges), and bumps the embedded version header.
Changes:
- Added explicit
locationhandling to allow/.well-knownrequests. - Added a regex
locationto return 404 for dotfile paths. - Reformatted the PHP
if (!-f ...)guard into a multi-line block.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| index index.html index.htm index.php; | ||
|
|
||
| # Allow access to the ".well-known" directory | ||
| location ^~ /.well-known { |
|
I am a bot, here are the test results for this PR:
|
This moves things around a bit based on the comments from copilot. There are PRs open on our other images using the nginx base that haven't merged yet, but the goal is to keep the confs similar across all of them. |
No description provided.