Problem:
After installing onlyoffice (docker) and onlyoffice-plugin in mattermost. It shows Download failed when open files in mattermost.

Reason:
JWT_HEADER must be set to a value that is not Authorization, as stated here:
- JWT Header: If JWT protection is enabled, it is necessary to specify a custom header name since the Mattermost security policy blocks external 'Authorization' Headers. This header should be specified in the ONLYOFFICE Docs signature settings as well (further information can be found here).
Reference: https://github.com/ONLYOFFICE/onlyoffice-mattermost?tab=readme-ov-file#plugin-settings
Solution:
- Modify docker-compose.yml for onlyoffice and add environment JWT_HEADER
version: '3'
services:
onlyoffice:
image: onlyoffice/documentserver
ports:
- "3080:80"
- "3443:443"
environment:
JWT_HEADER: AuthorizationJWT
restart: unless-stopped
volumes:
- ./data:/var/www/onlyoffice/Data
- Restart
docker compose up -d
- Modify the setting in mattermost
