Modifying Headers in Server Is Messy
-
Matt Todd
- State changed from new to open
Fixed the clumsiness of the basic_authorization call, implementing almost exactly the example above. Instead of basic_authorization, the method is now called basic_auth, and it now accepts options for only certain actions or all except a few, though by default it requires basic authorization for all actions.
For example:
class Foo < Halcyon::Server::Auth::Basic basic_auth :only => [:foo, :bar] do |user, pass| [user, pass] == ['rupert', 'secret'] end end -
Matt Todd
- State changed from open to resolved
For now, this should be sufficient since, when performing requests, you can easily supply additional headers.
For example.
get('/foo/bar', {'X-Special-Header' => 'value'})This will be reevaluated in 0.5.0 when the server and client internals have been restructured for more elegant options for whole-application header values or callbacks allowing quick modification before being sent, but this will be sufficient for now.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.