craig
craig copied to clipboard
Downloads cannot be accessed over HTTP on LAN
When selfhosting, the download page appears completely blank connecting from another computer on the LAN. Using browser devtools, it becomes clear that it is trying to load the page assets (including JavaScript) over HTTPS, which cannot work.
If anybody else is experiencing this problem, the Content Security Policy, which is the source of this issue, can be disabled via the below instructions. Please note that this solution is NOT recommended for a public-facing server.
- Download the patch file to your local repository folder: disableContentSecurityPolicy.patch
- Open a terminal in the repository and run the following command:
git apply disableContentSecurityPolicy.patch
- Recompile the project with
install.sh.
If you do not want to use the patch file, you can manually edit the file at apps/download/api/src/api.ts.