'Can you use an IIS to pass through an API-Call?
I do have a working API on one of my servers, lets call him server_one.
So if my HTTP POST is something like https://server_one/api/xyz
is there any chance i can configure an IIS to create another call-point like https://server_two/api/abc
which acts like an own API but just passes through the inital call and its answer?
Thanks alot in advance!
Solution 1:[1]
Firstly, install Application Request Routing.
Download address: http://www.iis.net/downloads/microsoft/application-request-routing.
Secondly, open the proxy.
1.Double-click to enter Application Request Routing.
2.Click on Server Proxy Setting to start the proxy service.
Thirdly, configure reverse proxy rules.
1.Open the site where the code is deployed and select URL Rewrite.
2.Select Add Blank Rule.
3.Fill in the matching pattern ^api/(.*)
4.Configure conditions: such as {HTTP_HOST}=^server_one$
5.Select rewrite for the action type, and fill in rewrite URL.
Finally, Save the rules and restart the site so that you can reverse proxy to another API by calling the API available on the server_one.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | JennyDai |