Skip to content

Commit

Permalink
Bind server to 127.0.0.1 instead of *
Browse files Browse the repository at this point in the history
Otherwise all your js and css files would be accessible from other
machines in the same network.
  • Loading branch information
stroborobo committed Jan 2, 2013
1 parent 9095ee5 commit 7d14022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/djsd
Expand Up @@ -55,7 +55,7 @@ dotjs = Class.new(WEBrick::HTTPServlet::AbstractServlet) do
end
end

server = WEBrick::HTTPServer.new(:Port => 3131, :AccessLog => [])
server = WEBrick::HTTPServer.new(:BindAddress => "127.0.0.1", :Port => 3131, :AccessLog => [])
server.mount('/', dotjs)

%w( INT TERM ).each do |sig|
Expand Down

0 comments on commit 7d14022

Please sign in to comment.