Azure / Azure/static-web-apps

Add WebSocket support

Open
#1,487 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
I would like to request WebSocket support for Azure Static Web Apps. I understand there are current API constraints that prevent this. I have an Angular app that calls my API, hosted in Azure App Service, which uses SignalR. That API has endpoints like "/api/hubs/messages" that the client can connect to and get SignalR messages.

When trying to connect, my client gets the following error message:
```
Error: Failed to start the connection: Error: Unable to connect to the server with any of the available transports. Error: WebSockets failed: Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled. ServerSentEvents failed: Error: 'ServerSentEvents' is disabled by the client. LongPolling failed: Error: 'LongPolling' is disabled by the client.
```

**Describe the solution you'd like**
I would like to be able to call "/api/hubs/messages" and have it connect to my SignalR API hub.

**Describe alternatives you've considered**
I could try ServerSentEvents or LongPolling, but I really would like web sockets to work.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.