reintroduced localization middleware.

The only difference I've found is that post requests need to explicitly define their url or else they will get redirected