
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Rack-allow-from is a simple piece of Rack middleware, which accepts connections from authorized hosts. Unauthorized hosts receive "403 Unauthorized access". Hosts are defined as IP addresses, host names, or simplistic regexes of either (ie 1.2.3.* or *.example.com).
White listed IPs are checked against env['REMOTE_ADDR']
. White listed host names are validated against the client provided header, X-Remote-Hostname (env['HTTP_X_REMOTE_HOSTNAME']). When a host name is specified, its A record must match env['REMOTE_ADDR']
, or the connection is rejected.
This version only supports Rails 3 applications.
config.allow_from
is defined as an array of strings
["127.0.0.1", "localhost", "*.dev"]
config.allow_from += ["host.name"]
, unless you know what you're doing*.example.com
becomes .*\.example\.com
["127.0.0.1", "192.168.*", "example.com", "*.example.com"]
Rails.configuration.allow_from.empty?
will reject all requestsRails.configuration.allow_from
accepts all requestsThe middlware is inserted during boot, using Rails::Railtie and should appear near the top of rake middleware
.
rails s
curl http://192.168.1.2:3000/
config.allow_hosts += ["*.example.com"]
192.168.1.2 foo.example.com
to /etc/hostsrails s
curl -H "X-Remote-Hostname: foo.example.com" http://192.168.1.2:3000/
Copyright (c) 2012 Philip Champon. See LICENSE.txt for further details.
FAQs
Unknown package
We found that rack-allow-from demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.