APK and cross domain request issue
Posted: Sat Nov 05, 2016 9:33 am
I have a working web app that does a http request to run some cgi.
I converted it to an APK and it runs up on phone.
However the http request fails.
I can get it to work by changing the apache server hosting the cgi to allow cross site requests
Add in mod_headers.so
and in Directory section add
Header set Access-Control-Allow-Origin "*"
Is there another (better) way to do this ?
Enabling cross site is not recommened for apache security.
Thanks,
Phil
I converted it to an APK and it runs up on phone.
However the http request fails.
I can get it to work by changing the apache server hosting the cgi to allow cross site requests
Add in mod_headers.so
and in Directory section add
Header set Access-Control-Allow-Origin "*"
Is there another (better) way to do this ?
Enabling cross site is not recommened for apache security.
Thanks,
Phil