-
Notifications
You must be signed in to change notification settings - Fork 59
Description
The issue
The env var "API_HOST" for the monograph container, should be the public URL of the API container, and not the internal docker name of the API container.
notesnook-sync-server/docker-compose.yml
Line 193 in 02ccd6c
| API_HOST: http://notesnook-server:5264 |
The reason why
When looking at the monograph code we can see the API_HOST is defined here :
https://github.com/streetwriters/notesnook/blob/8435e69cb59100b4c1ec70faec36dd0628605cba/apps/monograph/app/utils/env.ts#L21
And is used both internally in the monograph server AND in the html sent to the user :
https://github.com/streetwriters/notesnook/blob/8435e69cb59100b4c1ec70faec36dd0628605cba/apps/monograph/app/components/monographpost/index.tsx#L232
And because it's also sent in the html to the user, the request to the API "/monographs/<ID>/view" does not work as it's the internal URL and not the public URL. (Can be shown in the devtools > Network tab > look for the failed request)