1

I am connecting to my OData V4 feed in the cloud using PowerBI

e.g https://dotnet.com/odata/customers

The above url is using a reverse proxy and underneath its actually https://dotnet.azurewebsites.net/odata/customers

This forces PowerBI to lookup the metadata for the url and it calls https://dotnet.azurewebsites.net/odata/customers$metadata however this url is blocked as we need all people going through the reverse proxy.

Is there a way to tell the OData framework to use the original host name for the metadata url?

User101
  • 748
  • 2
  • 10
  • 29

1 Answers1

0

This used to be a big issue with SOAP clients, when you don't have access or control over the service layer you can simply manually manipulate a copy of the $metadata document so that it has the correct URLs, then alter the specific path to that document in your reverse proxy to "fool" the consumer.

Because it is your service though, check out this solution to Override host of webapi odata links. Its an elegant solution that cuts into the message pipeline to rewrite the urls, their use case is almost identical to OP:

My particular application was to host an OData service behind a proxy server, and I wanted all the URLs presented by the server to be the externally-visible URLs, not the internally-visible ones. And, I didn't want to have to rely on annotations for this; I wanted it to be fully automatic.

Chris Schaller
  • 13,704
  • 3
  • 43
  • 81