fix(config): mirror the nginx deny rules in the Apache template, Secure cookie by scheme - #2458
Open
elcreator wants to merge 1 commit into
Open
fix(config): mirror the nginx deny rules in the Apache template, Secure cookie by scheme#2458elcreator wants to merge 1 commit into
elcreator wants to merge 1 commit into
Conversation
…re cookie by scheme ht.access refused nothing that ng.inx refuses: /core, /views, /vendor, /tmp, the writable assets areas, composer.json/.lock, dumps and backups, and PHP under assets/ were all left to per-directory .htaccess files. Those only apply with AllowOverride, and they were written in the Apache 2.2 dialect, which a 2.4 server without mod_access_compat answers with a 500. The rewrite rules now live in ht.access ahead of the assets/manager passthrough, and every shipped .htaccess carries both dialects behind mod_authz_core guards. manager/.htaccess switched mod_security off with a 1.x directive; dropped. install/.htaccess stripped the Content-Security-Policy header the installer itself sets with a nonce; dropped. The session cookie's Secure flag came from SESSION_SECURE_COOKIE alone, and the session proxy, which is the default, reads the config value rather than detecting HTTPS, so an HTTPS site never got the flag without setting the variable. Unset, the option now follows the request scheme; the variable still overrides it for a TLS-terminating proxy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136CYHW4NXMDFA8gfuNCx7R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ht.access refused nothing that ng.inx refuses: /core, /views, /vendor, /tmp, the writable assets areas, composer.json/.lock, dumps and backups, and PHP under assets/ were all left to per-directory .htaccess files. Those only apply with AllowOverride, and they were written in the Apache 2.2 dialect, which a 2.4 server without mod_access_compat answers with a 500. The rewrite rules now live in ht.access ahead of the assets/manager passthrough, and every shipped .htaccess carries both dialects behind mod_authz_core guards.
manager/.htaccess switched mod_security off with a 1.x directive; dropped. install/.htaccess stripped the Content-Security-Policy header the installer itself sets with a nonce; dropped.
The session cookie's Secure flag came from SESSION_SECURE_COOKIE alone, and the session proxy, which is the default, reads the config value rather than detecting HTTPS, so an HTTPS site never got the flag without setting the variable. Unset, the option now follows the request scheme; the variable still overrides it for a TLS-terminating proxy.