rlidwka / sinopia

Private npm repository server
5.51k stars 656 forks source link

nginx https/ proxied sinopia server in http returns http download links #82

Open jedi4ever opened 10 years ago

jedi4ever commented 10 years ago

My setup is

nginx with https -> sinopia http setup . I can put and install packages fine.

For larger packages installing through npm takes forever (not sinopia's fault, but npm inefficiency to parse large files). Therefore we use the npm view dist.tarball to find the direct download URL. As sinopia is running in http mode, the download URLs are in http mode too.

Would be nice to have a way to specify the metadata or return protocol in content returned by sinopia.

xolox commented 10 years ago

I had the same problem. Using the url_prefix configuration option allowed me to hard code a URL prefix starting with https:// which seems to work fine, so that should resolve your issue (tested with Sinopia/0.8.2).

cusspvz commented 8 years ago

@jedi4ever, @xolox answer solves your question. (I had the same)

@rlidwka this issue could be closed.