Access-Control-Allow-Origin: "http://subdomain.domain.tld"
Access-Control-Allow-Methods: "GET"
Access-Control-Allow-Credentials: "true"
Access-Control-Allow-Headers: "X-Requested-With"
$.ajax
url: kodi.config.user_db
xhrFields: {'withCredentials': true}
success: (ctx) =>
return true if ctx.username is not null
Are you able to send HTTP basic auth credentials with this? I seem to have the server setup properly (I'm seeing all the appropriate Access-Control-... headers in the server response). My ajax request is not setting the 'Authorization' header in the request though, and the result is a 401 Unauthorized response. (note that I've also got the username and password properties set in the $.ajax options)