Make htdocs_location more useful
|Reported by:||cboos||Owned by:|
|Severity:||normal||Keywords:||htdocs_location static chrome|
At the occasion of the discussion on r10203 and r10204, osimons pointed me at the limitations of the htdocs_location and the fact that it was sometimes pretty useless as such, as it only coped with the core trac resources (those below common/).
You end up having to add rewrite rules in the web server if you want to serve the static resources of the plugins, those exported along with Trac core ones when using trac-admin <env> deploy <dir>.
This got me thinking if we couldn't enhance the htdocs_location internal rewrite mechanism so that it would take care of all the chrome/ resources (except for the site/ and shared/ ones).
By using a new setting, htdocs_location_prefix, we could control the restriction that we currently apply on resources starting with common/. So the default value for that new setting will be common/, but we would also support the empty value for serving everything but site/ and shared/ prefixes, and *, serving everything including site/ and shared/.
Testing here on demo-0.13, seems to work well, but OTOH, there are no plugins ;-) Feedback welcomed.