ABP的语言及使用signalr
发布于: March 4, 2017, 1:26 pm 分类: 技术文章 作者: Zigzag 0 个评论
折磨人的跨域问题:
XMLHttpRequest cannot load https://api.taskexe.com/signalr/negotiate?clientProtocol=1.5&token=0J2rv2jZ…bpcommonhub"},{"name":"messagehub"}]&_=1488597450711. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'https://taskexe.com' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
意思大约是说,如果Cors使用通配符*则不允许使用 Access-Control-Allow-Credentials: true,两者是矛盾的。在signalr的跨域请求时,application_start中使用了,跨域: