Hi David Dong,
Thanks for the update, Glad to hear the issue resolved itself. these kinds of intermittent problems can be tricky, especially when they stem from VPN behavior or upstream network layers in Azure.
Posting this on behalf of David, just for the benefit of the community in case anyone else runs into a similar issue.
If you're experiencing WebSocket connection failures (such as 403 errors) on an Azure Web App—especially for apps like Streamlit that rely on WebSockets—and everything was working previously, here are a few things to check:
Make sure WebSockets are still enabled in the App Service configuration.
Ensure the app is using wss://
if HTTPS is enforced.
Review access restrictions, authentication settings, and custom domain mappings that might affect WebSocket headers or TLS.
If you're connected through a VPN or proxy, test the app outside that network—some VPNs interfere with WebSocket upgrades.
Also test in a clean browser session or incognito mode to rule out extensions or pop-up blockers.
In David’s case, the issue resolved itself after a few days, likely due to VPN interference or a transient issue upstream in Azure.
Hope this helps someone facing a similar issue.
Please do not forget to click "Accept the answer” and Yes
wherever the information provided helps you, this can be beneficial to other community members.
If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.