Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
No variables used in the script so lower bootstrap level is needed
Comment | File | Size | Author |
---|---|---|---|
#5 | stats-boot.patch | 1.32 KB | andypost |
Comments
Comment #1
mtiftNot part of CMI
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedDRUPAL_BOOTSTRAP_DATABASE is gone. Maybe try one earlier?
Comment #3
andypostLet's see, at least cache and database are needed
Comment #4
sunI'd go with DRUPAL_BOOTSTRAP_PAGE_CACHE for now, which is directly before _VARIABLES, so you don't have to manually include cache.inc and database.inc.
Comment #5
andypostI see no any reason to disturb page cache at all, this works on kernel
Comment #6
andypostThe only question is - do we able to override this request by kernel only.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedNice patch.
Your question doesn't quite parse for me. Care to rephrase it?
Comment #8
sunKERNEL works, too.
Comment #9
andypostThe question was about ability to override this dumb implementation in contrib to be more performant.
Because better to check that node exists and find some way to protect 'statistics.php'
Comment #10
moshe weitzman CreditAttribution: moshe weitzman commentedAh right. Yes, I expect that some js_alter would let you change the ajax callback to a different route.
Protecting statistics.php might be best done outside of PHP like in .htaccess or similar. But really someone can hit your node page 100 times in a row so it would be natural that statistics.php gets hit 100 times as well. If you don't protect the node page, why would you protect the statistics.php page? DOS protection is best done with Cloudflare, Akamai, etc.
Comment #11
catchCommitted/pushed to 8.x, thanks!