rstudio / plumber

Turn your R code into a web API.
https://www.rplumber.io
Other
1.4k stars 257 forks source link

Document pros/cons of `$run(host = "0.0.0.0")` #546

Open UnclAlDeveloper opened 4 years ago

UnclAlDeveloper commented 4 years ago

An undocumented feature of $run is (host = "0.0.0.0"). This opens up the plumber API to the world. Can this be made the default.

Firewall rules, Amazon Security Group Rules, etc. are very specialized at their job of defining what can or can't enter. API's should be open to anything that enters.

meztez commented 4 years ago

Works fine without RStudio too. We use it in production all the time. What you are missing from RStudio is the callbak that opens Swagger UI. But you can do it yourself.

UnclAlDeveloper commented 4 years ago

Actually that appears a mistake on my part. I've edited the original question. I was a bit tired and frustrated when I wrote it.

meztez commented 4 years ago

Sorry, but I don't understand what the issue is then? The default host is 127.0.0.1 which is the localhost. If you have problems configuring nginx or apache or a cloud deployment, you can ask on stackoverflow or on the rstudio community discourse.

I understand that you would expect the process to deploy plumber to the cloud to be better documented. Being an open source project, maybe you could contribute that documentation once you have it figured out for AWS?

schloerke commented 4 years ago

Yes. Especially useful within docker containers.