Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

When hosting http:// based instance, download links are https:// (scheme confusion) #666

Closed
claudijd opened this issue Dec 8, 2017 · 2 comments · Fixed by #667
Closed

Comments

@claudijd
Copy link
Contributor

claudijd commented Dec 8, 2017

I tried deploying and instance on the bench to play around with send and noticed that when the docker instance is hosting content over http:// and I drag and drop a link, the download URL that's offered is https:// on the same http:// hosting port, resulting in a bad link.

Now, if send is running behind an ssl termination proxy, this is all well and good, but if you are testing locally, this presents a mis-match. I'm wondering if the served download URL on an http-based instance should be http:// and then let whatever front end SSL/TLS termination proxy do the translation.

Here's a pic example of what I'm seeing in case it's not clear:

screen shot 2017-12-08 at 3 10 44 pm

Note: http:// transport, but https:// download URL.

@dannycoates
Copy link
Contributor

This is sort of a "feature" of using the NODE_ENV=production environment variable in that it forces the generated link to be https. We should probably change docker-compose.yml to not set NODE_ENV

@claudijd
Copy link
Contributor Author

claudijd commented Dec 8, 2017

Yeah, I can confirm, removing that and rebuilding and docker-compose up that that addresses the issue. Happy to send a PR for the docker-compose.yml (assuming prod deployment over-write this env var)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants