0

I have a question about how can I configure -H "Host: my.host.com" from gateway to my api.

I have the following logic:

I try to cover, for example, my-api.net via apiman-gateway.

For example, I can do the following direct call to my api like 'curl -X GET --header 'Accept: */*' -H "Host: www.google.com" 'http://my-api.net/accounts?accountNumber=12314123'.

Based on this call, my api will know, that my consumer is google for example. But once I try to make a call via apiman-gateway 'curl -X GET --header 'Accept: */*' -H "Host: www.google.com" 'http://apiman-gateway/GoogleOrganization/API/V1/accounts?accountNumber=12314123', the host is not possible to pass, and implementation of my api tells me that it does not know any host name like already deployed my-api.net. Probably someone can tell me how can I set up for example via policy, probably just to make a call from apiman-gateway to my api with the host parameters like above?

Zoe
  • 27,060
  • 21
  • 118
  • 148
  • what are the headers you get on the application side ? Did you try to print all the headers in the request and check? – ulab Apr 18 '17 at 14:11
  • Have you tried the simple header policy? – Marc Savy May 11 '17 at 11:34
  • Hi Marc, yep I have used with simple header policy, but it does not change host header at all. I have created my own policy based on config policy, it just take incoming host and move it to other header value. Hence, the question is still open, probably someone will explain us later, where have am I wrong – Andrew Kosintsev May 11 '17 at 13:22

0 Answers0