Can't run in subpath
Describe the bug
Neoboard can't be run in a subpath proxied by nginx because the link to bundle.js seems to contain absolute path.
Steps To Reproduce
- Run Neoboard
node /usr/bin/yarn start - Proxy it with nginx:
location /neoboard/ {
proxy_pass https://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $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;
}
- Go to https://your-server/neoboard
- Get white screen and 404 as the index page tries to get to /bundle.js which should be /neoboard/bundle.js
Expected behavior
Widget warning showing up
Thanks for the report! 🙂 We picked up the issue. Updates will be shared here.
Feel free to contribute 😉
Workaround
Apparently this works for the deployed demo at github-pages.
In .github/workflows/ci.yml I found:
sed -i 's,"homepage": "/","homepage": "/matrix-neoboard",' matrix-neoboard-widget/package.json
After changing the line in matrix-neoboard-widget/package.json yarn build then tells me:
The project was built assuming it is hosted at /neoboard/.
You can control this with the homepage field in your package.json.
After setting up the reverse proxy as you told, I could successfully add the widget to a matrix room. Would love to configure this via environment variable and in the docker-image, maybe someone more "dev" then me can pick that up.
Kind regards, David