com-lihaoyi / cask

Cask: a Scala HTTP micro-framework. Cask makes it easy to set up a website, backend server, or REST API using Scala
https://com-lihaoyi.github.io/cask/
Other
525 stars 55 forks source link

IPV4 and IPV6 + deceptive default value for "host" #103

Closed jrlemieux closed 1 month ago

jrlemieux commented 8 months ago

I would suggest to document the JVM defines that are required when we want the server to bind only on IPV4 addresses:

-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false

Also, I would recommend to remove the default value of "localhost" for the "host" method, as it is typically not what we will want. The host has to be overriden with a value such as override def host = "10.0.0.1". The "localhost" will work well in development, but as soon as we deploy to a different box, it won't work because if the server binds to localhost, it will only reply to queries made on 127.0.0.1.

Thank you.

lihaoyi commented 1 month ago

Probably going to call this a wontfix