fix: remove unused favicon and related references from configuration#457
fix: remove unused favicon and related references from configuration#457Akhileswara-Microsoft wants to merge 2 commits intodevfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces favicon-related noise by removing favicon references/assets from the React public HTML and by short-circuiting /favicon.ico requests at the nginx layer to avoid logging them.
Changes:
- Removed favicon and apple-touch-icon
<link>tags (and related explanatory comment) frompublic/index.html. - Added an nginx
location = /favicon.icoblock that returns204and disables logging for that path. - Removed the unused
public/favicon.icoasset.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/ContentProcessorWeb/public/index.html |
Removes favicon-related HTML references so the app no longer explicitly advertises the icon. |
src/ContentProcessorWeb/nginx-custom.conf |
Prevents /favicon.ico requests from generating access log entries by intercepting them at nginx. |
src/ContentProcessorWeb/public/favicon.ico |
Removes the unused icon file from the web public assets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Prevent favicon requests from being logged in network logs | ||
| location = /favicon.ico { | ||
| return 204; | ||
| access_log off; | ||
| log_not_found off; | ||
| } | ||
|
|
There was a problem hiding this comment.
The comment mentions "network logs", but this block is specifically about suppressing nginx access/error logging for /favicon.ico. Consider rewording to match nginx terminology. Also, log_not_found off; is redundant here because the handler always return 204; (no 404/not-found case). Removing it would reduce confusion.
| # Prevent favicon requests from being logged in network logs | |
| location = /favicon.ico { | |
| return 204; | |
| access_log off; | |
| log_not_found off; | |
| } | |
| # Suppress nginx logging for favicon requests | |
| location = /favicon.ico { | |
| return 204; | |
| access_log off; | |
| } |
Purpose
This pull request makes adjustments to how favicon requests are handled in the web application, aiming to prevent unnecessary favicon requests from being logged and to clean up the HTML references to the favicon. The changes improve server log clarity and remove redundant favicon references from the HTML.
Server configuration improvements:
nginx-custom.confto return a 204 status for/favicon.icorequests and disable access and not found logging for these requests.HTML cleanup:
index.html, eliminating references tofavicon.icoin the HTML head. [1] [2]index.htmlexplaining how to reference the favicon, since favicon links have been removed.Does this introduce a breaking change?