feat: update Mattermost proxy configuration and documentation for improved clarity and default behavior
This commit is contained in:
@@ -15,7 +15,7 @@ Mattermost Team Edition 11.4.2 exposes normal `/api/v4` REST and WebSocket traff
|
||||
- Start `scripts/mattermost-proxy/run-mirror.sh`
|
||||
- Open `http://mitm.it`
|
||||
- Install/trust the certificate in Keychain.
|
||||
3. Optional: copy `.env.example` to `.env` and set `MATTERMOST_MIRROR_HOST_ALLOW` to the exact Mattermost host.
|
||||
3. Optional: copy `.env.example` to `.env` and set `MATTERMOST_MIRROR_HOST_ALLOW` to the exact Mattermost host, for example `mm.all-win-solutions.app`.
|
||||
|
||||
## Run day to day
|
||||
|
||||
@@ -101,3 +101,32 @@ Each line in the normalized JSONL contains:
|
||||
- `MATTERMOST_MIRROR_CHANNEL_IDS`: optional comma-separated channel ID allowlist.
|
||||
- `MATTERMOST_MIRROR_WRITE_RAW`: set to `1` to save compact raw REST/WebSocket evidence.
|
||||
- `MATTERMOST_APP_PATH`: Mattermost Desktop `.app` bundle path.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### TLS certificate warnings
|
||||
|
||||
Mitmproxy uses a persistent local CA under `~/.mitmproxy`. If the desktop app
|
||||
asks about the certificate after every proxy restart, install and trust that CA
|
||||
in macOS Keychain instead of approving it only in the app prompt:
|
||||
|
||||
1. Start `scripts/mattermost-proxy/run-mirror.sh`.
|
||||
2. Open `http://mitm.it` from a browser on this Mac and download the macOS certificate.
|
||||
3. Add it to Keychain Access and set it to **Always Trust**.
|
||||
4. Restart Mattermost Desktop through `launch-mattermost.sh`.
|
||||
|
||||
Warnings for unrelated hosts such as `releases.mattermost.com` or OpenGraph
|
||||
preview hosts are not required for message capture. The mirror only writes
|
||||
normalized messages from Mattermost `/api/v4` REST/WebSocket payloads.
|
||||
|
||||
### Proxy logs show traffic but no `latest.md`
|
||||
|
||||
The mirror writes files only after it sees a post payload. Startup calls such as
|
||||
`/api/v4/teams`, `/api/v4/users`, `/api/v4/files`, or WebSocket ping/ack events
|
||||
do not create message files. Open a channel, open a thread, scroll slightly in
|
||||
history, or wait for/send a new message. Then check:
|
||||
|
||||
```text
|
||||
ai/inbox/mattermost-mirror/latest.md
|
||||
ai/inbox/mattermost-mirror/messages/YYYY/MM/YYYY-MM-DD.jsonl
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user