The following example shows how to render different content based on the user agent in your Middleware.
Your middleware file should be placed at the root of your project. If you are using the src directory, the file should be placed in the src directory.