mattermost-plugin-docup icon indicating copy to clipboard operation
mattermost-plugin-docup copied to clipboard

Include CSRF token in webapp’s API requests

Open mickmister opened this issue 4 years ago • 0 comments

When a plugin’s webapp makes an API request to the Mattermost server, it needs to include the CSRF token supplied by the server in its request. This can be done using the getOptions function exported by the mattermost-redux library. Here is some example usage

https://github.com/mattermost/mattermost-plugin-jira/blob/ae5676ead0e9effca29d2948c6596f42cf6e35c1/webapp/src/client/index.js#L13-L18

mickmister avatar Apr 21 '20 17:04 mickmister