Docs: Added hide for *.php files to file_server directives.#1463
Docs: Added hide for *.php files to file_server directives.#1463
Conversation
| php @phpFiles | ||
| file_server | ||
| file_server { | ||
| hide *.php |
There was a problem hiding this comment.
I'm not sure it makes sense to add hide *.php to this specific configuration. It might make people think they need to add it everywhere, even though in this case it's (as you mentioned) redundant.
Maybe it would make more sense to add a separate section with a specific scenario in which this would be necessary for security?
|
If there's any issue at the Agreed I don't like extra lines either, but if there's any regression/crash in FrankenPHP or someone messes up a Caddyfile edit, you get a very scary failure scenario. |
|
I agree with @AlliBalliBaba, we want to keep the docs as concise and straightforward as possible. |
|
No slight to Kevin or the rest of the team, FrankenPHP is brilliant and I love the community work being done!! Thoughts in case this is closed early:
|
|
I'm ok to add a section about this, just don't make it the default. |
Thought I'd make a quick documentation PR as this has always spooked me with FrankenPHP. Prevents accidental exposure of raw
.phpfiles when usingfile_server. It'd be a security nightmare if we had an issue with unwanted PHP code downloads, particularly with projects that mix assets with code.Protects us against scenarios where a
.phpends up atfile_server, ex:Caddyfilemisconfiguration (could be as lame as a syntax issue or commenting outphporphp_server) or FrankenPHP issue/crash.