How to properly work with a /stream in a multipage application?

Hi all
Please help me figure out what is the correct format for working with websocket /stream in a multi-page application.
I see on the network that when you go to the page myapp.com/page1, a request is first made to wss://myapp.com/page1/stream and I get 404 here in the nginx logs, also with page1/healthz
Perhaps someone knows how to properly configure nginx to handle this situations?
I use streamlit version 1.10.0