I am using cordova to create a android app and i am using php-mysql as backend.
I am fetching/sending data from database by ajax.
As you know we can't fetch the data directly due to CORS issue.
to fetch the data remotly we need to add
header("Access-Control-Allow-Origin: *");
Problem is it makes my backend exposed. Because any one can try to fetch the data from backend. Which i don't want.
Please advise how can i make it secure.
Thanks