I am having problems with CORS, which I can't seem to resolve.
My setup:
- Router/Hotspot on network A
- Webserver on network B
What I am trying to do, is... The user inputs his email into the Hotspot entry page, and when he clicks submit, the email is sent to the webserver (currently using XAMPP), this is where the CORS problem occures.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myIpAddress:8080/DBinsert.php. (Reason: CORS header 'Access-Control-Allow-Origin' missing.
Perviously I had header('Access-Control-Allow-Origin: *');
set and I had no CORS problems...
I have tried adding this code to the very beginning of my php, but it still doesn't work...
header('Access-Control-Allow-Origin: http://10.5.50.*');
I have also tried
header('Access-Control-Allow-Origin: http://10.5.50.*:8080');
and it doesn't work...
The computers IP is 10.5.50.3
Any help and explenations would be welcome.
Thank you.