0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Improve basic_auth example

Some web browsers will now prompt for user name and password
This commit is contained in:
Adam Cammmack 2013-02-04 13:28:46 -06:00 committed by Adam Cammack
parent ae401f7460
commit fbdd3af63e

View file

@ -18,7 +18,7 @@ is_authorized(Req, S) ->
{<<"basic">>, {User = <<"Alladin">>, <<"open sesame">>}} ->
{true, Req1, User};
_ ->
{{false, <<"Restricted">>}, Req1, S}
{{false, <<"Basic realm=\"cowboy\"">>}, Req1, S}
end.
content_types_provided(Req, State) ->