Azure App Services decodes %2F in a inbound request url to /

nik 0 Reputation points
2024-08-28T12:27:20.02+00:00

Going to host a Linux .NET 8 WebAPI application with App Services Web App.

Problem: When the inbound request url contains a %2F the App Services internal proxy magically converts that to / so when the request hits the application it is a HTTP 404 as that URL is unknown.

Example:

Original value: https://myapp.azure/foo/abc%2Fcba
Expected value: https://myapp.azure/foo/abc%2Fcba
Actual value: https://myapp.azure/foo/abc/cba

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,509 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,647 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ben Gimblett 4,330 Reputation points Microsoft Employee
    2024-08-28T14:49:56.67+00:00

    Hi Thanks for the question - yes this is default behaviour - the following should help you https://github.com/Azure/azure-functions-host/pull/9402 same was also referenced here https://github.com/dotnet/aspnetcore/issues/40532

    Please let us know if this works for you


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.