Open hallejuyahaha opened 6 days ago
What is the URL of the page you made this screenshot with? The URL of the website before path is the origin required for authentication.
Please try look at the DevTools -> Network page and fine the WebSocket connection request. Make sure the origin header value matches the allowedorigins
(the format is Regexp, so don't use the * at the end).
Additionally, I have heard about (not a chrome user myself so did not verify) that insecure websocket are disallowed globally in Chrome. You probably should not do them even under a LAN. There will likely be related console messages if this is the case.
I specifically used Firefox, and my URL is: I also modified the config.yml: However, the following error still occurs: 我专门使用了firefox,我的url是: 而且我在config.yml中也修改了: 但是依然是如下错误:
The screenshot you shown shows a websocket connection to /ws (likely the auto reload function of development servers or other ws servers), can you find the one that goes to /stream?
It is hard to see what is happening just with this, it would help if you can post a minimal HTML file that reproduce the problem.
It's likely https://github.com/gotify/server/issues/372 the cors allowed origins must be configured too.
Have you read the documentation?
You are setting up gotify in
Describe your problem
I am unable to use WebSocket links in web pages:
My gotify webui is able to receive messages normally. My Vue JS code looks like this: const token = 'Cj8ZU5BYA9ct8Qc'; const wsUrl =
ws://172.96.194.186/stream?token=${token}
; this.socket = new WebSocket(wsUrl );Any errors, logs, or other information that might help us identify your problem
Ex:
docker-compose.yml
,nginx.conf
, android logcat, browser requests, etc.Name of the information here