[99s-extend] Cowboy pre request filter

Mark Nijhof mark.nijhof at cre8ivethought.com
Thu Mar 6 00:47:08 CET 2014


Hi,

I want to create a module that basically sits between the incoming request
and the http handler for that request to ensure a request is authenticated
(using a cookie), if the request is not authenticated then I like to
redirect to a specific login page (which should not be filtered).

Is this possible with Cowboy? Should I use the onrequest hook (not sure if
I can force redirects from there) for that or is there a better way?

Cheers,

-Mark

-- 
Mark Nijhof
t:   @MarkNijhof <https://twitter.com/MarkNijhof>
s:  marknijhof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ninenines.eu/archives/extend/attachments/20140306/a517215b/attachment.html>


More information about the Extend mailing list