aspnetcore
aspnetcore copied to clipboard
Consider providing override for platform detection in JS/TS SignalR client
An internal team reached out with a problem they are experiencing with our platform detection logic:
https://github.com/dotnet/aspnetcore/blob/7918436a914ac1cbafa94a359e435c67535c8159/src/SignalR/clients/ts/signalr/src/Utils.ts#L40C9-L40C9
Locally this works, but they are seeing a problem in production where it is detecting that it is in the browser instead of Node. This could possibly be due to global namespace pollution from another package that is impacting their code that runs locally.
They asked whether it would be possible to provide the ability to override the platform detection logic.
Another possibility is that we could see whether there is a better way to detect that we are running in Node vs. looking for the presence of the window global variable.