Module: Parklife::Sinatra
- Defined in:
- lib/parklife/sinatra.rb
Class Method Summary collapse
Class Method Details
.registered(app) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/parklife/sinatra.rb', line 7 def self.registered(app) # Disable Rack::Protection::HostAuthorization middleware so that fetching # a page with Parklife works in development. It's safe to do here because # it will only be executed when this file is explicitly required in a # Parkfile and not in general when the app is running in a web server. if app.settings.respond_to?(:host_authorization) app.set(:host_authorization, permitted_hosts: []) end end |