You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When CORS is disabled on a server and nginx does not pass the origin header through proxy, iOS shows banner "Server is not reachable", but everything seems working.
Environment Information
Device Name: iPhone 14 Pro
OS Version: iOS 17.2.1
Mattermost App Version: v2.12.0
Mattermost Server Version: 8.1.9 (self-hosted)
Steps to reproduce
Set nginx as a proxy with provided configuration
Disable CORS in System Console
Expected behavior
No error banner, same as in the desktop or web app
{"timestamp":"2024-01-20 09:26:12.039 Z","level":"debug","msg":"Failed to upgrade websocket connection.","caller":"web/context.go:113","path":"/api/v4/websocket","request_id":"3nxe19op8jb9ubn9jteca9b3ga","ip_addr":"127.0.0.1","user_id":"adwp74goufycfru1p8m4ptra5w","method":"GET","err_where":"connect","http_code":400,"error":"connect: Failed to upgrade websocket connection., websocket: request origin not allowed by Upgrader.CheckOrigin"}
NGINX server logs
37.235.104.12 - - [20/Jan/2024:09:27:11 +0000] "GET /api/v4/websocket?connection_id=wp9t4o6zj389ig3h6d518sbn4e&sequence_number=1 HTTP/1.0" 403 191 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.89 Electron/27.0.2 Safari/537.36 Mattermost/5.6.0" "<ip>"
Unfortunately, I hadn't chance to try it on Android device.
Possible fixes
It is probably caused by badly configured passing of the Origin header through proxy, but I think that all platform should treat this the same way. And in this case, only iOS shows the problem.
After setting allowCorsFrom: '*', banner dissapears.
The text was updated successfully, but these errors were encountered:
I'm in a similar situation and having the same problem.
This problem occurs only with the iOS/Android client and not with the Desktop Client or browser.
This problem does not occur if allowCorsFrom: '*' is set.
We're experiencing the the same behaviour but only on iOS mobile devices. The problem occurred after updating the mattermost app to 2.12.
The "workaround" allowCorsFrom: '*' doesn't help. Mattermost is served by a KEMP LB without Nginx.
Mattermost 8.1.11 ESR
iPhone 13
iOS 17.4
Mattermost Mobile 2.14
Summary
When CORS is disabled on a server and nginx does not pass the origin header through proxy, iOS shows banner "Server is not reachable", but everything seems working.
Environment Information
Steps to reproduce
Expected behavior
No error banner, same as in the desktop or web app
Observed behavior (that appears unintentional)
iOS logs
Mattermost server logs
NGINX server logs
NGINX configuration
Mattermost config
Unfortunately, I hadn't chance to try it on Android device.
Possible fixes
It is probably caused by badly configured passing of the Origin header through proxy, but I think that all platform should treat this the same way. And in this case, only iOS shows the problem.
After setting
allowCorsFrom: '*'
, banner dissapears.The text was updated successfully, but these errors were encountered: