Hello,
I want to block requests from other domains, and allow only my domain.
I tried to to it by this code in PHP:
header("Access-Control-Allow-Origin: http://my_username_domain.000webhostapp.com");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
header("Access-Control-Allow-Headers: Content-Type");
but then when I try to send request to any php file on ther server, from localhost (for example)
the code does not block the request.
why?
thanks.