GitHub Plugin - Attach to GitHub Issue does not work when ExperimentalStrictCSRFEnforcement is true

Description

Changes where made in https://github.com/mattermost/mattermost-plugin-github/pull/166 to support the plugin working when ExperimentalStrictCSRFEnforcement is set to true.

When the flag is true the Attach to GitHub Issue functionality does not work. The user will see an error about being unauthorized in the modal and the web request returns a 401 response.

Steps:

  • Install and configure WebEx plugin

  • Set ExperimentalStrictCSRFEnforcement to True

  • Click the "..." on a post and select Attach to GitHub Issue

  • Select an issue using the search and click Attach
    Observed: User will see an error about being unauthorized

QA Test Steps

None

Reporter

None

Status

Mana

None

Assignee

Unassigned

QA Assignee

None

Reporter

Dylan Haussermann

Epic Link

Fix versions

None

Mattermost Team

Integrations

Sprint

None

Labels

None

QA Testing Areas

None

GitHub Issue

None

Components

None
Configure