craig icon indicating copy to clipboard operation
craig copied to clipboard

Downloads cannot be accessed over HTTP on LAN

Open TCAtrevor opened this issue 8 months ago • 2 comments

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.

Image

Image

TCAtrevor avatar May 03 '25 21:05 TCAtrevor

Image

TCAtrevor avatar May 03 '25 21:05 TCAtrevor

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.

  1. Download the patch file to your local repository folder: disableContentSecurityPolicy.patch
  2. Open a terminal in the repository and run the following command:
git apply disableContentSecurityPolicy.patch
  1. 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.

Image

TCAtrevor avatar May 04 '25 01:05 TCAtrevor