I have a multi-site Craft install. I'd like to offer the ability for each site to upload an icon that will be used for favicons. I noticed a lot of 404s for both /favicon.ico and /apple-touch-icon.png, which appear to be hardcoded in various clients. I'd thus like to route those URLs directly to the requisite asset files, but on a per-site basis.
- I can't just put the files into /web, since that's shared among all the sites, and I want site-specific icons.
- I'm hosting assets on S3 (since we are using a load balancer).
Is there a way to do this in Craft without writing a custom plugin to do so?
If there exists a plugin to do this, or if I could do it via Craft directly, that would be wonderful, but I cannot find a way to do so.
If I have to write a custom plugin, I'd have it basically:
- Respond to those URLs
- Look up the requisite field in Globals for the assets on a per-site basis.
- Download the asset file locally (and cache locally in /storage)
- Set the proper MIME type
- Serve the file from /storage directly
Does this sound reasonable or would there be a better way to handle this?
Thanks in advance for any assistance!