How to redirect web service URLS using nginx/haproxy from internal to the cloud instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2018 03:25 AM
Hi,
Hoping someone is able to provide some assistance or recommendations here.
We are wanting to make API calls from an internal network URL and have it automatically redirect to the servicenow cloud instance. We currently use the nginx/haproxy load balancer.
The redirection works seemlessly on the browser level as there is a user proxy which manages it, however when trying to make a call outside the browser such as postman/soapui it won't connect.
The idea is to be able to maintain the old URL that interface calls go to such as:
https://interfaces.companyname.com/api/table/incident
and i translates to
https://companyname.service-now.com/api/table/incident
Any suggestions will be greatly appreciated! even with other tools you might think can serve its purpose
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2018 12:42 PM
AFAIK, this is not possible.
The way ServiceNow has their LBs set up, it needs the companyname.service-now.com in the URL in order to forward to the correct app server. I was told (many years ago) that it's because the whole datacenter shares the same VIP.
With their move to dedicated VIPs for some customers this may change, but for now you're out of luck.
One thought: if you do a server-side redirect (301), that may work, but your consuming apps would have to handle appropriately.
For ngnix, the format looks like (per Stack Overflow😞
return 301 http://companyname.service-now.com$request_uri