#Url Masking
Url masking means hiding the actual target server domain with SAP HANA Cloud Platform, API management runtime APIProxy domain. There are many ways in which it can be achieved. In this scenario we are taking a simple JavaScript based approach to replace all the target host references with the APIProxy reference. This would work well for simple APIProxies (esp in case the response data is not huge) created with target Url instead of being linked to the API Provider. In this example we will also handle the masking of the target base path with the proxy base path. The base path is the URI fragment that follows the host in the URL as specified during the proxy creation and for the target endpoint, the target endpoint base path is the base path of the target url as specified during the proxy creation.
How to use the sample
- Click on URLMask.zip and then click on the “View Raw” Link or “Download” button to download the sample.
- Import the Downloaded API Proxy zip into your SAP HCP, API management tenancy. Additional instruction for this is available in link.