'NET Core App cannot read more_set_headers in Nginx Proxy Manager

I setup my nginx proxy to have custom header by using more_set_headers and my netcore app reads the headers and get "portal_site_id". The app is running on docker with nginx proxy manager webserver.

var PortalSiteHeader = context.HttpContext.Request.Headers["portal_site_id"];
 

Can anyone tell me why my app is not getting the custom header but I see it on the response headers like the one below?

more_set_header confirmed on response

Here is the nginx code

location / {
    more_set_headers "PORTAL_SITE_ID:b8eac40b-d0bf-4eb5-b049-a8ddb3d24424";
    more_set_headers "PortalSiteId:b8eac40b-d0bf-4eb5-b049-a8ddb3d24424";
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    proxy_http_version 1.1;
    include conf.d/include/proxy.conf;
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source