boot-http icon indicating copy to clipboard operation
boot-http copied to clipboard

Add option to listen on localhost instead of any

Open amatus opened this issue 9 years ago • 5 comments

Better yet, add the ability to pass arbitrary options to jetty to enable things like SSL too (#30).

amatus avatar Dec 31 '15 02:12 amatus

For me, it listens on localhost, do you mean the other way around?

SevereOverfl0w avatar Jan 28 '16 10:01 SevereOverfl0w

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0      0 :::8000                 :::*                    LISTEN      12573/java    

amatus avatar Jan 28 '16 15:01 amatus

Sorry for not responding earlier. I agree this would be nice. What would the API look like?

pandeiro avatar Feb 25 '16 17:02 pandeiro

Is there any way to bind it to another than localhost address? Is the project dead? Any alternatives to it?

drownbes avatar Nov 02 '16 10:11 drownbes

Hey @drownbes: the project is not dead. There is not currently a way to bind to an address other than localhost, but this should be possible to add. As mentioned above, we just need an idea of what the API should look like. I'd suggest possibly adding options like:

k httpkit              bool "already exists and provides option to use httpkit instead of jetty"
K httpkit-config  edn "exposed httpkit config options"
J jetty-config      edn "exposed jetty config options"

The httpkit-config and jetty-config could allow for more complicated things like SSL as @amatus describes above. Alternatively we could simply add the option to use another address as -a address STR or -i ip STR. Exposing both the address and config options would probably be fine as well. I can try to tackle this if it would be useful to people, but would just need to know what @pandeiro thinks about the API options.

Chris-Andrews avatar Nov 02 '16 14:11 Chris-Andrews