Refused to set unsafe header "User-Agent"
Related to check-in #759. When connection to my signalR hub I get the following error: HttpClient.js:20 Refused to set unsafe header "User-Agent"
Which eventually results in my code in: signalr connection error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.
Hello, is your signalr-client.js error in IE?
No, tested in chrome on windows and mac. I removed pollXhr.setRequestHeader('User-Agent', UserAgent); in Transports and xhr.setRequestHeader('User-Agent', UserAgent); in HttpClient and it works.
I tested it on ie, citing signalr client.js error, which is correct in chrome. It has something to do with the syntax of javascript. Why not just launch the native js instead of the ts version? Currently, it appears that only client js does not support IE
@Marcelh1983 - thanks for reporting. Will look into this. @leehavin - I am working on a IE compatible version. See https://github.com/aspnet/SignalR/pull/772#issuecomment-325066554
Fixed in 69072614530585d6008ad53ecb80638e81de13b7