I am trying to make a login page from cross domain but I couldn\'t solve the problem, the error is:
XMLHttpRequest cannot load http://localhost/testin
remove this:
headers: {"Access-Control-Allow-Headers": "Content-Type"},
from your jQuery.ajax call.
The server responds with a Access-Control-Allow-Headers
header, the client doesn't send it to the server.
The client sends a Access-Control-Request-Headers
to request allowing certain headers, the server responds back with with a Access-Control-Allow-Headers
that lists the actual headers its going to allow. The client does not get to demand what headers are allowed.