- Added small middleware to simulate rewrite