Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Due to the vast majority of drupal sites using the default directory, random hosts can get into the boost cache by sending a host header to the servers IP. What I'm proposing is a whitelist where one can type in a list of hostnames that are good.
If you have the domain access module installed then it will use the domains from there as the whitelist.
whitelist can do things like *.example.com
blacklist would then do bad.example.com
if this feature is disabled then display all hosts in the boost_cache table.
Comment | File | Size | Author |
---|---|---|---|
#1 | boost_domain_whitelisting.patch | 14.45 KB | cotto |
Comments
Comment #1
cotto CreditAttribution: cotto commentedAttached is a patch that adds optional whitelisting (with wildcards) and blacklisting for domain caching. I tried to avoid taking up more config ui space than necessary for the majority of users who won't care about this, and tried to make the descriptions on the admin form as clear as I could for the ones who will. The patch should also have no significant cost to users who don't use it and a minimal cost for those who do. I tried to keep whatever processing I could in the admin form submit handler to minimize the amount of work that the code in boost_is_cacheable would need to do.
Improvements and suggestions are welcome, but I'm also comfortable with the patch being applied as-is.
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedComment #3
mikeytown2 CreditAttribution: mikeytown2 commentedthanks & committed!
http://drupal.org/cvs?commit=503614