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

PHPBB3-12787
Merge branch 'ticket/12787' into test-profiler