1

In Azure, I have an Angular app hosted as a Static Web App and an API hosted as an App Service which also uses SignalR. Recently, to avoid preflight requests, I used the Static Web App feature to link my SWA to my App Service so I can use a single domain name for both resources. So instead of my SWA (https://www.example.com) calling "https://api.example.com/..." it calls "https://www.example.com/api/..." and Azure sends all "/api" traffic to my App Service. This works great except that I can see in the Dev Tools Console of my browser that SignalR is failing about every 45 seconds.

My guess would be something with the ws:// protocol, but nothing is getting logged, so I can't tell what the problem is. As a workaround, I have SignalR still calling my API directly instead of through the SWA, but if I could avoid preflight requests for SignalR as well, that'd be ideal.

How can I setup my SWA to forward SignalR traffic correctly?

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.