Certificate Authentication on Proxy Pass between 2 App Services

Kanisius Raychitra Lieka Avisena 0 Reputation points
2025-02-22T04:14:01.2333333+00:00

I have two Azure App Service running in NGINX and PHP.

Azure App Service A acts like a reverse-proxy to App Service B, which it will forward the request of /api via proxy_pass. I want to do manual certificate verification via a custom header. So I made a small test.

This is how I set the configuration for nginx.conf

Location ^~ /api {

proxy_set_header X-Custom "test";

proxy_pass_request_headers on;

proxy_pass https://apiwebsite.azurewebsites.net/api;

}

For first trial code above, I purposely set header of X-Custom and "test" as string. But upon inspection in App Service B, I try to find the HTTP_X_Custom, but I cannot find the header at all.

I tried to direct request to App Service B with the custom header, and I can see the custom header. But only on proxy_pass between two App Services, seems that the HTTP header get sanitized in the middle.

May I seek your help to help me understand on the concept here? How to solve this?

Thanks

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,350 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.