-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use SiteURL for all calls from the webapp #61
Comments
By default, requests from the frontend to the server are not prefixed with any host. For example, a fetch request like An example before the fix: fetch('/api4/users'); But we want const siteURL = getSiteURL(state);
fetch(siteURL + '/api4/users'); The link in this issue's description is to a different project, just to show how to get the SiteURL. This fix needs to be applied to other plugin projects as well, such as the skype4business plugin here. The SiteURL is currently not being used in the frontend portion of the skype4business plugin. |
* add domain in client js file * add url * fixed lint issues * updated lint issues * updated style changes * resolved comments , removed unwanted changes * resolved comments * resolved comments * resolved comments * resolved comments * resolved comments * resolved comments * resolved comments * [MI-2506]:Fixed issue mattermost-community#61 of skype4business Co-authored-by: sanjay12345 <sanjaymj824@gmail.com> Co-authored-by: Maisnam Raju Singh <85172229+maisnamrajusingh@users.noreply.github.com> Co-authored-by: maisnamrajusingh <raju.s@demansol.com>
If the server's SiteURL is configured with a subpath, the webapp's API calls do not work. The task here is to make this plugin's client to prefix its URLs with the SiteURL. This also includes any calls to
/plugins/*
Only API calls to the Mattermost server should use the SiteURL. Any calls to Microsoft servers should not use the SiteURL.
Here's an example of how the SiteURL may be computed:
https://github.com/mattermost/mattermost-plugin-jira/blob/19a9c2442817132b4eee5c77e259b80a40188a6a/webapp/src/selectors/index.js#L13-L26
The text was updated successfully, but these errors were encountered: