Last active
June 5, 2018 08:09
-
-
Save joshmn/66f715c65bc19784f95a0e2ce3c9df93 to your computer and use it in GitHub Desktop.
this rack app will return whatever http status code you want, too.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/wwalexander/febbc1ba76c8eafa9f94f5cb2573b34d | |
# https://news.ycombinator.com/item?id=17235270 | |
# | |
# Make sure this is named config.ru | |
# install the gem with | |
# $ gem install rack | |
# | |
# Usage: rackup | |
require 'rack' | |
run ->(env) { [(env['REQUEST_PATH'][-3, 3].to_i.nonzero? ? env['REQUEST_PATH'][-3, 3].to_i : 200), {"Content-Type" => "text/html"}, [' ']] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment