Running Mattermost in a /subdir returns 404 errors for UI plugins

Description

Summary
When running mattermost in a /subdir on a server, plugins loose track of the path and assume the root.

Steps to reproduce
Configure mattermost to run on a example.tld/subdir/ in the config.json then install a plugin that uses the webserver to launch resources, for instance the zoom or standup-raven one.

Expected behavior
I expect plugins to get the real full pwd from the mattermost config that I have configured to include /subdir not just the domain and append /plugins to it

Observed behavior
404 not found errors on plugins such as zoom and standup-raven.

Possible fixes
A workaround so far has been to unload all plugins affected, edit the main.js file to point to /subdir/plugins instead of just /plugins and then load the plugin. This ofcourse resets each time mattermost is restarted.

QA Test Steps

None

Mana

None

Assignee

Michael Kochell

QA Assignee

None

Reporter

Amy Blais

Epic Link

None

Fix versions

Mattermost Team

Integrations

Sprint

None

Labels

QA Testing Areas

None

GitHub Issue

None

Components

None

Severity

None
Configure