Hello everyone,
We are working on a custom implementation of a web application for Mattermost, connecting to the Mattermost server through our backend. During development, we’ve encountered some specific challenges related to the integration of plugins, such as Focalboard and PlayBooks, and the management of cookies across different domains.
Initially, we set up a reverse proxy server using Nginx within our web application to handle the frontend and the Mattermost server on separate instances. However, we faced an issue where the plugins were not displayed in the frontend. We are unsure if this is viable, and if it is, what we would need to configure for them to be displayed.
To overcome this hurdle, we tried deploying our custom frontend along with the Mattermost instance, placing the compiled code directly in the /mattermost/client path of our Mattermost server instance. When we navigate to the domain of the Mattermost server, our frontend is displayed correctly. However, when accessing Mattermost through our backend (located on a different domain), the cookies were set under this latter domain. This resulted in the requests made by the plugins not including the necessary cookies, since they were pointing to the domain of the webapp, which is the same as that of the Mattermost server, preventing the plugin requests from completing correctly.
We are looking for advice or solutions that would allow us to solve this problem. The questions we are currently asking ourselves, which we don’t know if they are the best paths to choose, are:
- Configure the Mattermost instance to serve the webapp through a reverse proxy server. Is this technically possible?
- Modify the domain to which the plugins send their requests, so that it matches the domain of our backend.
- Adjust the individual instances of the server and the Mattermost webapp so that the plugins are displayed properly.
It is important to mention that we are deploying these instances in a Kubernetes environment.
Has anyone faced similar challenges or has experience configuring Mattermost in this way? Any guidance, practical example, or suggestion would be greatly appreciated.
Thank you in advance for your help and we look forward to your responses