Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route integration actions to plugins without hitting the network #11964

Closed
lieut-data opened this issue Aug 26, 2019 · 1 comment · Fixed by #12156
Closed

Route integration actions to plugins without hitting the network #11964

lieut-data opened this issue Aug 26, 2019 · 1 comment · Fixed by #12156
Labels
Area/Toolkit Plugins and integrations framework Difficulty/2:Medium Medium ticket Help Wanted Community help wanted PR Exists Tech/Go Server

Comments

@lieut-data
Copy link
Member

DoActionRequest in the app package detects a relative URL and automatically prepends the SiteURL to free plugins from having to do this drudgery. This improves plugin compatibility in environments where the SiteURL contains a subpath, but the plugin was not written to account for same.

However, the resulting URL must still be fully resolved: e.g. the server makes an HTTP connection to http://mm.domain.com/plugins/plugin_id/path. This will fail in environments where mm.domain.com cannot be resolved, or refuses to connect due to firewall rules. This may not be the case for single server instances, but is likely in a load balancer situation where mm.domain.com points to another box that wouldn't normally be routed to from a server.

Improve DoActionRequest to route plugin requests directly to the plugin's ServeHTTP hook implementation. This should work for any plugin already using relative URLs without requiring a plugin recompilation.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-18068

@lieut-data lieut-data added Area/Integrations A mattermost integration (plugin, integration, etc) Difficulty/2:Medium Medium ticket Help Wanted Community help wanted Tech/Go Server Up For Grabs labels Aug 26, 2019
@scottleedavis
Copy link
Contributor

👍 I'd like to do this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Toolkit Plugins and integrations framework Difficulty/2:Medium Medium ticket Help Wanted Community help wanted PR Exists Tech/Go Server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants