Digest authentication error for NX cloud because of proxy redirects to different URL
AnsweredHi. I created NX cloud system and GET cloud ID based on this article https://support.networkoptix.com/hc/en-us/articles/360016266074-Cloud-API-Route-API-Calls-via-Nx-Cloud .
When i make request i use this base URL for every request :
https://{systemId}.relay.vmsproxy.com
Now i try to get list of cameras from GET /ec2/getCamerasEx, and everything was working fine on my test environment, but when i create production system, i notice that after initial request to get ww-authenticate header, the server URL changes from :
https://{systemId}.relay.vmsproxy.com -> https://{systemId}.relay-REGION.vmsproxy.com
This caused API to return for me error 401, Auth_WrongDigest, to fix this, i was required to use
https://{systemId}.relay-REGION.vmsproxy.com
as base URL and all API calls worked fine.
So my question is how to prevent digest error because of URL changes?
Or i should always try to get redirected URL from initial response and use it later on?
Thank you.
Please sign in to leave a comment.
Comments
1 comment