Skip to content

Instantly share code, notes, and snippets.

View danielwestendorf's full-sized avatar
🤘
rustl'n jimmies

Daniel Westendorf danielwestendorf

🤘
rustl'n jimmies
View GitHub Profile
@danielwestendorf
danielwestendorf / compress_requests.rb
Created March 28, 2017 23:28 — forked from relistan/compress_requests.rb
Rack Middleware to automatically unzip gzipped/deflated POST data
class CompressedRequests
def initialize(app)
@app = app
end
def method_handled?(env)
!!(env['REQUEST_METHOD'] =~ /(POST|PUT)/)
end
def encoding_handled?(env)