How to fix rewrite not working in web config for azure webapp microsoft IIS 11.0

Mohamed Farook 0 Reputation points
2024-09-24T13:08:12.94+00:00


       

The above is the web config for the react application I have given for Azure Web App service with Microsoft IIS 10.0. VehicleInfoLookup is the proxy we used to replace the baseURL for external API request and its POST method. For this Api request, I am getting the following 404 response:
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

When I looked at the response header, I can see custom security header being implemented as below:
HTTP/1.1 404 Not Found Date: Tue, 24 Sep 2024 10:58:37 GMT Content-Type: text/html Content-Length: 103 Connection: keep-alive Server: Microsoft-IIS/10.0 Strict-Transport-Security: max-age=31536000; includeSubDomains; preload X-Powered-By: ASP.NET X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff `**`Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.youtube.com https://*.googletagmanager.com https://script.infinity-tracking.com https://cdn.cookielaw.org; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'`** Referrer-Policy: strict-origin-when-cross-origin X-Permitted-Cross-Domain-Policies: none Cross-Origin-Resource-Policy: same-site Cross-Origin-Opener-Policy: same-origin` ``

When I navigated to app-level routing used by react-router-dom, I am able to navigate in the application. For Testing when I removed the proxying by directly hardcoding the endpoint, it is hitting the endpoint successfully. But not with this proxying. are there any rewrite module to be installed manually to make this proxying works. I understand webserver comes with default rewrite module. Do I miss anything? can anyone please help on this?

Azure Web Application Firewall
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,721 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
921 questions
{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.