Skip to content

Instantly share code, notes, and snippets.

@spiritbear
Created August 13, 2015 01:13
Show Gist options
  • Select an option

  • Save spiritbear/c8949f7a6be4323a88ab to your computer and use it in GitHub Desktop.

Select an option

Save spiritbear/c8949f7a6be4323a88ab to your computer and use it in GitHub Desktop.

Revisions

  1. spiritbear created this gist Aug 13, 2015.
    17 changes: 17 additions & 0 deletions remote_ip.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    require 'rack'
    require 'rack/server'


    class RemoteIp
    def response
    [200, {}, 'Hello World']
    end
    end

    class RemoteIpApp
    def self.call(env)
    p env
    end
    end

    Rack::Server.start "app" => RemoteIpApp