Skip to content

fix: remove unused favicon and related references from configuration#457

Open
Akhileswara-Microsoft wants to merge 2 commits intodevfrom
remove_unused_favicons_Akhileswar
Open

fix: remove unused favicon and related references from configuration#457
Akhileswara-Microsoft wants to merge 2 commits intodevfrom
remove_unused_favicons_Akhileswar

Conversation

@Akhileswara-Microsoft
Copy link

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:

  • Added a new location block in nginx-custom.conf to return a 204 status for /favicon.ico requests and disable access and not found logging for these requests.

HTML cleanup:

  • Removed the favicon link and apple touch icon link from index.html, eliminating references to favicon.ico in the HTML head. [1] [2]
  • Deleted the comment in index.html explaining how to reference the favicon, since favicon links have been removed.

Does this introduce a breaking change?

  • Yes
  • No

@Akhileswara-Microsoft Akhileswara-Microsoft changed the title Fix: remove unused favicon and related references from configuration fix: remove unused favicon and related references from configuration Mar 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) from public/index.html.
  • Added an nginx location = /favicon.ico block that returns 204 and disables logging for that path.
  • Removed the unused public/favicon.ico asset.

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.

Comment on lines +5 to +11
# Prevent favicon requests from being logged in network logs
location = /favicon.ico {
return 204;
access_log off;
log_not_found off;
}

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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;
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants