Use of domains instead of IP not working since V2 in Swagger


#1

Hi, in 1.9 I used a domain instead of the ghastly urls that Amazon gives us, Using a specialist DNS company and the IP address and pointing that to the Amazon instance DF.

This gave me for instance

http://mymobileplatform.com/dreamfactory/dist/index.html#/apidocs

This is great because if we want to change Amazon instance I just change it in the DNS server to the new IP. But this has stopped working in V2 :frowning: .
In V2 I can login using the domain name but if you try and use the API docs to say POST something it does not seem to recognize that you are logged in from a domain.

In 1.9 after the post the URL it provides in Swagger is with the domain and works. In V2 it reverts to the IP address and does not work. It responds with “no content”.

Is there a config I can change to rapidly fix this or is this something the developers need to fix? Will it work outside of Swagger, in the real world if I use a domain and not an IP? I am in mobile app development and it extremely important not to put a fixed IP (or Amazon address) built into the app as one needs to issue an upgrade to app store and google play to change the Amazon instance.


#2

You may be interested to know that I tried it using the long url from Amazon, and it also fails. It seems only to work if one logs in using the IP. Could this be a CORS thing? I find it hard to believe that this is a bug!!


#3

OK, it was CORS. I had it setup with a name where the host should instead of an asterix, thinking this was where I named the config (it is what is in the dropdown list, which is usually a name!) . However there is still a change is so far as the URL in Swagger that my developers will be told to use has still reverted to the IP address and not the domain. Sure I can tell them to just replace the IP with the domain, but is there a reason why the IP address is there in V2 and in 1.9 it was the domain?