404 obtain the original request URL ?

30 views
Skip to first unread message

ad...@binarytemple.co.uk

unread,
Apr 29, 2015, 12:24:35 AM4/29/15
to chica...@googlegroups.com
Hi,

I'd like to write a 404 handler which sends the original URL to the template in order to have something like:
"you tried to access '/foobar', I have no idea what /foobar is, support staff have been notified, thanks"

But I don't know what the correct parameters for a 404 handler are, the examples only show "lost('GET',[]) ->"

Is there an easy way to obtain the original request URL ?

Bryan

Kai Janson

unread,
Apr 29, 2015, 1:36:29 AM4/29/15
to chica...@googlegroups.com
Take a look at http://chicagoboss.org/doc/api-controller.html specifically the section of simple bridge.  The listed functions are all par of the Req passed into your function in a chicagoboss controller.  Referer, peer_ip and others can be used to create a meaningful 404 page (i.e. Req:peer_ip()).

-Kai

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/3aa2e35e-1e77-455f-bb84-786c1a42267b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Evgeny M

unread,
Apr 29, 2015, 10:42:11 AM4/29/15
to chica...@googlegroups.com
Req:uri() if I remember right

среда, 29 апреля 2015 г., 7:24:35 UTC+3 пользователь Bryan Hunt написал:
Reply all
Reply to author
Forward
0 new messages