Skip to content

Use Mattermost backend server as a proxy for external API

Afonso Cerejeira requested to merge backend into main

As discussed in this snippet the previously architecture for this plugin was flawed since it exposed the HTTP headers when communicating with the external API. The solution proposed in this MR is to also include a Mattermost backend part of the plugin that acts as a proxy to the external API, thus hiding any custom HTTP headers.

The backend part, fully written in Go, provides an endpoint, /com.collabora.profile-plus/api/v1/users/{username}, that acts as a proxy to the external API returning an object containing only the badges and status fields. This endpoint is only accessible to users logged in the Mattermost client.

The updates on the frontend are simpler, only changing the way the requests to the API are made, this time using the included mattermost-redux client for making requests to the Mattermost server.

cc @araujo

Merge request reports