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.
ALLOWED_VERBS | = | %w[GET HEAD OPTIONS] |
ALLOW_HEADER | = | ALLOWED_VERBS.join(', ') |
F | = | ::File |
path | -> | to_path |
cache_control | [RW] | |
path | [RW] | |
root | [RW] |