Homec4science

Support ".ico" in Celerity and simplify rewite rule configuration

Authored by epriestley <git@epriestley.com> on Oct 20 2016, 20:14.

Description

Support ".ico" in Celerity and simplify rewite rule configuration

Summary:
See D16734.

  • Add ".ico" files to the Celerity map.
  • Add a formal route for "/favicon.ico".
  • Remove instructions to configure /rsrc/ and /favicon.ico rewrite rules.

Long ago, we served resources directly via /rsrc/ in at least some cases. As we added more features, this stopped working more and more often (for example, Apache can never serve CSS this way, because it doesn't know how to post-process {$variables}).

In modern code (until this change), only /favicon.ico is still expected to be served this way.

Instead, serve it with an explicit route via controller (this allows different Sites to have different favicons, for example).

Remove the instructions suggesting the old rewrite rules be configured. It's OK if they're still in place -- they won't break anything, so we don't need to rush to get users to delete them.

We should keep "webroot/favicon.ico" in place for now, since it needs to be there for users with the old rewrite rule.

Test Plan:

  • Ran celerity map.
  • Loaded /favicon.ico, got resource via route.
  • Used celerity_generate_resource_uri() to get paths to other icons, loaded them, got icons.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16737

Details

Committed
epriestley <git@epriestley.com>Oct 20 2016, 20:28
Pushed
aubortJan 31 2017, 17:16
Parents
rPHa3253f78ce14: Make query engines "overheat" instead of stalling when filtering too many…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH1f6ad5e7ddd1: Support ".ico" in Celerity and simplify rewite rule configuration (authored by epriestley <git@epriestley.com>).Oct 20 2016, 20:28