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

🐛 bug: Summarize does not work on with Mattermost running on a sub directory. #251

Open
grisuthedragon opened this issue Oct 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@grisuthedragon
Copy link

Description

Due to some internal restrictions, we have our mattermost running on a subdirectory of a server. e.g. our url is

https://example.com/mattermost 

and a nginx based reverse proxy configured as

	location /mattermost {
		client_max_body_size 50M;
		proxy_set_header Connection "";
		proxy_set_header Host $http_host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Frame-Options SAMEORIGIN;
		proxy_buffers 256 16k;
		proxy_buffer_size 16k;
		proxy_read_timeout 600s;
		proxy_cache mattermost_cache;
		proxy_cache_revalidate on;
		proxy_cache_min_uses 2;
		proxy_cache_use_stale timeout;
		proxy_cache_lock on;
		proxy_http_version 1.1;
		proxy_pass http://mattermost;
	}
        location ~ /mattermost/api/v[0-9]+/(users/)?websocket$ {
             proxy_set_header Upgrade $http_upgrade;
             proxy_set_header Connection "upgrade";
             client_max_body_size 50M;
             proxy_set_header Host $http_host;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header X-Forwarded-Proto $scheme;
             proxy_set_header X-Frame-Options SAMEORIGIN;
             proxy_buffers 256 16k;
             proxy_buffer_size 16k;
             client_body_timeout 60;
             send_timeout 300;
             lingering_timeout 5;
             proxy_connect_timeout 90;
             proxy_send_timeout 300;
             proxy_read_timeout 90s;
             proxy_http_version 1.1;
             proxy_pass http://mattermost;
         }

serves example.com and dispatches the mattermost related stuff to the mattermost vm.

Chatting with the bot works fine. But calling GUI functions like summarize will lead to 404 error with the following url scheme

https://example.com/plugins/mattermost-ai/post/kt5ptgu66tdkjr7rb9xunjixdc/summarize?botUsername=ollama

So it seems that the plugin is not aware of the subdirectory setting of mattermost.

Steps to reproduce

Install mattermost and configure it to serve on a subdirectory, add a nginx reverse proxy, like above.

@grisuthedragon grisuthedragon added the bug Something isn't working label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant