Hi all! Thanks for taking a look at my issue, hopefully I provided enough data.
Summary
Mattermost webpage showing a Websocket error when used in a no internet access VLAN(in our case QVLAN as in quarantined).
Steps to reproduce
Logging into MM on a network which does not have internet access.
Expected behavior
No errors, just MM working as usual.
Observed behavior
Scenario: Using MM as a self hosted IM for our small company. We are working with very sensitive data and most of our networks do not have internet access. On the single network that has internet, MM is working fine.
But in the VLANs MM is throwing a Websocket error, and the chats don’t update automatically. If you refresh, the messages show up. What I found in Chrome’s Developer Tools / Network tab, is that 2 requests are unable to reach their URL which are:
Mattermost absolutely works disconnected from the Internet! This issue is probably due to AllowCorsFrom not being set. This is something that started being enforced in 7.8 IIRC
Hi John, appreciate the quick reply.
Don’t want to set CORS to “*” to allow CORS from any domain.
Would it be enough to set it to the VLAN’s gateway address?
So I changed the AllowCorsFrom to the VLAN gateway with the SiteURL set properly. That caused all clients to get Websocket errors on all VLANs. Also the config in the DB can’t be updated by changing the config.json anymore.
I had to change the AllowCorsFrom to * (was only able to do it in system console) for it to work again(with that it works on all VLANs obviously), but still the config.json doesn’t update the active config in the DB.
Do you have a paid subscription? If so, I’d definitely open a support case. I am a long way from being an expert here! I’ve asked if we have any additional guidance. Maybe Cross-Origin Resource Sharing (CORS) - HTTP | MDN will help?