examples: add favicon.ico for to avoid browser requests (#62511)
## What? To avoid the default `favicon.ico` request by the browser, we are adding a vercel `favicon.ico` to the project. Currently, we handle exceptions for `favicon.ico` entering the Dynamic Route `[lang]` in the following manner, but in this case, favicon.ico renders the entire page. [example:app-dir-i18n-routing](https://github.com/vercel/next.js/blob/canary/examples/app-dir-i18n-routing/get-dictionary.ts#L12) ```ts export const getDictionary = async (locale: Locale) => dictionaries[locale]?.() ?? dictionaries.en(); ``` Instead of `favicon.ico`, the full HTML of the default language 'en' is rendered. ![스크린샷 2024-02-26 오전 1 17 56](https://github.com/vercel/next.js/assets/59330828/ea46b75b-ae93-4db4-9b4b-db33fb5d5709) In the correct case ![스크린샷 2024-02-26 오전 1 24 49](https://github.com/vercel/next.js/assets/59330828/7faabec1-1fc7-4330-a5c3-30449efcace6) Fixes https://github.com/vercel/next.js/issues/46918 Co-authored-by: Sam Ko <sam@vercel.com>
This commit is contained in:
parent
0d1b11fba3
commit
e35ace6575
1 changed files with 0 additions and 0 deletions
BIN
examples/app-dir-i18n-routing/public/favicon.ico
Normal file
BIN
examples/app-dir-i18n-routing/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Loading…
Reference in a new issue