Page MenuHomePhabricator

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

Authored by epriestley on Oct 20 2016, 6:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 8:27 AM
Unknown Object (File)
Mon, Apr 8, 2:05 PM
Unknown Object (File)
Thu, Mar 28, 8:45 AM
Unknown Object (File)
Feb 14 2024, 12:19 PM
Unknown Object (File)
Feb 14 2024, 12:17 PM
Unknown Object (File)
Feb 14 2024, 12:17 PM
Unknown Object (File)
Feb 9 2024, 1:57 PM
Unknown Object (File)
Feb 7 2024, 6:59 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
ico1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14195
Build 18448: Run Core Tests
Build 18447: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Support ".ico" in Celerity and simplify rewite rule configuration.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 20 2016, 6:27 PM
This revision was automatically updated to reflect the committed changes.