Hi @Anonymous ,
For a 502 response, the request will not have reached the back end worker process, so implementing changes in the web.config and global.asax would not work as it won't reach the backend server. The resulting server header is not the server header of the application’s web server, but of a proxy in between. This proxy is a Front end load balancer that forwards the requests to the backend server.
Unfortunately, it is not possible to remove the Server header from the response generated solely by the Azure Function Front End (FE) instances/server. You can have a Azure APIM in front of the Azure functions to mask the server details.
Hope this helps! Feel free to reach out to me if you have any questions or concerns.