Listen on localhost only by default
trestletech opened this issue · comments
We should listen on the 127.0.0.1
host by default in Plumber until we're told to listen more broadly. This is following in the footsteps of Shiny and is more secure.
In anticipation for this change, if you desire that your Plumber instances would listen for connections publicly, you should set the host
parameter to 0.0.0.0
in your run()
call, e.g.
plumber::plumb("plumber.R")$run(host="0.0.0.0", port=8000)
This will not affect any servers provisioned using do_provision
, as those servers have a local Nginx instance that proxies all traffic. So from Plumber's perspective all incoming traffic is already local. And the firewall installed by default would have prevented direct access to extra ports anyways.