Content-Type Charset in Lowercase When Deployed to Azure App Service

Rhene Tutor 0 Reputation points
2024-08-29T14:07:29.1166667+00:00

I am experiencing an issue with my API deployed to Azure App Service. Locally, my API correctly returns the Content-Type header as application/json; charset=UTF-8, but when deployed to Azure, the header is returned as application/json; charset=utf-8.

Here are the specifics:

  • Local Environment: The API returns Content-Type: application/json; charset=UTF-8.
  • Azure App Service: The API returns Content-Type: application/json; charset=utf-8.

Questions:

  1. Are there any environment-specific settings or App Service backend that could be altering the header value?
  2. How can I ensure the Content-Type charset is consistently returned as UTF-8 rather than utf-8 in Azure App Service? (Without using APIM)

Any insights or recommendations would be greatly appreciated.

Local:

User's image

App Service:
User's image

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,675 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.