Include example of http API call using the mattermost-redux client options #83
Labels
Hacktoberfest
Help Wanted
Community help wanted
Up For Grabs
Ready for help from the community. Removed when someone volunteers
Summary
With the MM server config setting
ServiceSettings.ExperimentalStrictCSRFEnforcement
enabled, anyPOST
request that does not include the CSRF token supplied by the server will be rejected. In order to include the CSRF header supplied by the MM server, the webapp can use thegetOptions
method in themattermost-redux
client.Tasks
package.json
to include the latest commit hash ofmattermost-redux
, similar to this method. Then runnpm install
in the webapp directoryPOST
Client.getOptions
is used to create options for the requestTesting
Enable
ExperimentalStrictCSRFEnforcement
in the MM server'sconfig/config.json
file, then restart the server if it is already running. With this value enabled, the API call will only succeed when including the CSRF token.The text was updated successfully, but these errors were encountered: