Use middleware instead.