dotnet / dotnet/aspnetcore

Consider providing override for platform detection in JS/TS SignalR client

Open
#49,065 3 comments 0 reactions 0 assignees View on GitHub
area-signalr
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.