Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I would like to use APIM to proxy App Insights endpoint for a website front - end (javascript)
Reasons:
Problem 1 - cannot collect client IP address. This is important for a public e-commerce website with lots of synthetic traffic.
Problem 2 - Following Microsoft documentation does not work.
I need a very simple thing - overwrite x-forwarded-for
with client's IP address. That's all.
Here is my attempt:
<inbound>
<find-and-replace from="MYINSTRUMENTATIONKEY" to="123-456-678-fffff-ddsdfgsfdd" />
<set-header name="X-Forwarded-For" exists-action="override">
<value>@(context.Request.IpAddress)</value>
</set-header>
<set-header name="X-Forwarded-For-Test" exists-action="override">
<value>@(context.Request.IpAddress)</value>
</set-header>
<set-backend-service base-url="https://testmock.free.beeceptor.com" />
</inbound>
Outcome:
What's wrong?
My APIM is Basic v2