Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listen for both http and https with lineman run #310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pebcakerror
Copy link

Referencing issue #309.

This is a simple way to handle https during development. It will listen for https traffic along side http traffic via a configurable port.

@searls
Copy link
Member

searls commented Aug 14, 2014

@jasonkarns @davemo either of you have a chance to review / test this a bit? The impact is hard to read for me b/c of the indent shift

@searls
Copy link
Member

searls commented Aug 14, 2014

Okay, reviewing:

  • code changes what PR says it does and nothing else
  • only adds 66KB to the dependency list
  • works if you type "https://localhost:8443/"
  • works if you type "localhost:8443"

The last step just hangs forever.

Is there anything you can do to make it redirect if you hit the app on the HTTPS port to redirect to the https protocol?

@pebcakerror
Copy link
Author

Right because https and http listen on different ports but both are configurable.

http defaults to 8443 as you've seen.
http still defaults to 8000 as it did before.

@searls
Copy link
Member

searls commented Aug 14, 2014

Right, I realize that, but if someone wants to hit the https version of the page and they lazily type in localhost:8443 into their browser's address bar, they would expect that it would automatically redirect them to the correct protocol and not hang forever on http

@pebcakerror
Copy link
Author

Ahhh, I see what you're saying. I can look into that.

Do you think this PR still adds a measurable improvement and could be merged before adding a redirect enhancement?

@searls
Copy link
Member

searls commented Aug 14, 2014

Yeah, probably, but I do worry about the silly support issues the redirect thing will elicit.

I am also worried about what speed and memory overhead this introduces, since it's always on

@pebcakerror
Copy link
Author

Heh, Yea, I thought about that too. What do you think about an 'enableHttps' option?

@searls
Copy link
Member

searls commented Aug 14, 2014

+1 for an opt-in option

On Thu, Aug 14, 2014 at 12:38 PM, Jonathan Worent
[email protected] wrote:

Heh, Yea, I thought about that too. What do you think about an 'enableHttps' option?

Reply to this email directly or view it on GitHub:
#310 (comment)

@searls
Copy link
Member

searls commented Mar 10, 2015

Was this obviated by #352?

@jasonkarns
Copy link
Member

I think this would still be necessary. #352, afaict, only enables proxied requests to hit an https endpoint. It doesn't make lineman's server listen for https traffic.

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

Successfully merging this pull request may close these issues.

3 participants