Answer the question
In order to leave comments, you need to log in
CORS and HTTP basic auth - how to log in?
There are web services 1C are on iss7 in the server settings is specified
<add name="Access-Control-Allow-Origin" value="http://сайт" />
так же добавлял
name="Access-Control-Allow-Methods" value="POST,GET,OPTION"
name="Access-Control-Allow-Headers" value="Authorization"
$.ajax({
type : 'POST',
crossDomain : true,
dataType : 'xml',
data: хмл-запрос,
// headers : {'Authorization':'Basic ХХХХХХ'},
url : 'Адресс',
success : function(data){
console.log(data);
}
});
Answer the question
In order to leave comments, you need to log in
The server response must have an Access-Control-Allow-Credentials
header
. More Requests with credentials
Important note: when responding to a credentialed request, server must specify a domain, and cannot use wild carding. The above example would fail if the header was wildcarded as: Access-Control-Allow-Origin: *.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question