Add middleware before history-support-middleware