Class | Rack::File |
In: |
lib/rack/file.rb
|
Parent: | Object |
Rack::File serves files below the root directory given, according to the path info of the Rack request. e.g. when Rack::File.new("/etc") is used, you can access ‘passwd’ file as localhost:9292/passwd
Handlers can detect if bodies are a Rack::File, and use mechanisms like sendfile on the path.
SEPS | = | Regexp.union(*[::File::SEPARATOR, ::File::ALT_SEPARATOR].compact) |
ALLOWED_VERBS | = | %w[GET HEAD] |
F | = | ::File |
path | -> | to_path |
cache_control | [RW] | |
path | [RW] | |
root | [RW] |