This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Description
On shared hosting the admins want to deny individual site owners access to things like /pagespeed_global_admin, but on Apache the only way to prevent them from mapping one in with AddHandler in a .htaccess file seems to be to not include FileInfo in AllowOverride, which is generally much too restrictive (no headers, no rewrite rules).
To fix this we could add directives:
StatisticsDomains
GlobalStatisticsDomains
MessagesDomains
ConsoleDomains
AdminDomains
GlobalAdminDomains
which would take a comma separated list of domains. They'd be set at the VHost/server level or above. Then in mod_pagespeed.cc:instaweb_handler and ngx_pagespeed.cc:ps_route_request we would check these before classifying a request as belonging to the admin handler.
(This isn't really needed on nginx because there aren't .htaccess files, but I think it's simpler to add the feature to all platforms because then we can just doc it normally. And there may be uses for it on nginx I'm not thinking of.)