01-31-2013 04:48 AM
Hello,
I use an api from http://api.idlight.net/lookup via AJAX, but in the simulator I get the javascript alert that I don't have access to that URL, although in the config.xml I've tried all variants of the access tag:
<access uri="http://api.idlight.net/lookup" subdomains="true" />
or
<access uri="http://api.idlight.net/" subdomains="true" />
or
<access uri="http://idlight.net" subdomains="true" />
But I still get that error, any ideas why?
01-31-2013 09:56 AM
What is the exact alert? Is that webpage trying to load other resources as a cross domain request?
You are correct in your whitelisting logic as far as I can see.
01-31-2013 10:05 AM
It says:
Access to "http://api.idlight.net/lookup?q=test@test.com&key=kjgkdj4565kjbjh" not allowed.
I am trying to get some information from that api via a GET
01-31-2013 10:17 AM
Scary, can you send me your config file by email? You are just doing a get from the webpage to that URL?
01-31-2013 10:20 AM
Email sent, thanks.
02-01-2013 10:47 AM
The problem is the query contains the "@" symbol which is not a valid URI character. It should be % encoded. It should work otherwise
.
02-01-2013 11:03 AM
Great, thanks!
02-01-2013 11:33 AM
Unfortunately, it does work even after I've encoded the charachter @ ![]()
I get:
Access to "http://api.idlight.net/lookup?q=test%40test.com&key=kjgkdj4565kjbjh" not allowed.