Skip to content

Instantly share code, notes, and snippets.

@lucasprag
Created September 16, 2017 16:12
Show Gist options
  • Save lucasprag/c286ce8232ab165f09897bfbc4f85a05 to your computer and use it in GitHub Desktop.
Save lucasprag/c286ce8232ab165f09897bfbc4f85a05 to your computer and use it in GitHub Desktop.

Revisions

  1. lucasprag created this gist Sep 16, 2017.
    12 changes: 12 additions & 0 deletions hello_header.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    class HelloHeader
    def initialize(app)
    @app = app
    end

    def call(env)
    status, headers, body = @app.call(env)
    headers['Hello'] = 'World'

    [status, headers, body]
    end
    end