Is there a way to stop Rails' built-in server from listening on 0.0.0.0 by default?

前端 未结 3 1806
一生所求
一生所求 2020-12-17 21:34

I do a lot of web development on untrusted networks (coffeeshops, the neighbors\' open wifi, DEF CON), and I get twitchy when random, assuredly buggy software (my Rails app

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-17 21:44

    Use the --binding=ip parameter:

    rails s --binding=127.0.0.1
    

    https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server.rb

提交回复
热议问题