module Sinatra::Protection
Constants
- VERSION
Public Instance Methods
protected!()
click to toggle source
# File lib/sinatra/protection.rb, line 14 def protected! return unless settings.enable_protection return if authorized? headers['WWW-Authenticate'] = "Basic realm=\"#{settings.realm}\"" halt 401, "Not authorized\n" end