Page MenuHomePhabricator

Route hard-coded "/favicon.ico" requests to a favicon resource

Authored by epriestley on May 1 2020, 12:16 PM.



See PHI1719. User agents making hard-coded requests to "/favicon.ico" currently 404. This is a mild source of log noise, and we can reasonably route this request.


  • This only routes the "PlatformSite". Other sites (custom Phame blogs, third-party sites, Phurl redirectors) won't route here for now.
  • This returns a "Location:" redirect to the correct resource rather than icon data directly. This produces the right icon with the right caching behavior, and returning icon data directly is difficult in the general case. However, it won't perform/cache as well as a direct response would.
Test Plan
  • Visted /favicon.ico.
  • Before: 404.
  • After: redirect to favicon.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.May 1 2020, 12:16 PM
epriestley requested review of this revision.May 1 2020, 12:17 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 1 2020, 12:23 PM
This revision was automatically updated to reflect the committed changes.