[ticket/12787] Allow the route to say that the referer has to be used.

https://tracker.phpbb.com/browse/PHPBB3-12787

PHPBB3-12787
`$request->is_ajax()`