DynamicKatanaPipeline

Example Katana style middleware which contains one or more Microsoft.Owin.StaticFiles middleware that reconfigures itself based on changes to a config file triggered from a filesystem watcher.

Run the host project, edit the config.txt file (should be obvious) and refresh the page.

The key trick is to new up your own IAppBuilder instance within your middleware and direct subsequent requests down the new pipeline.

You can use this infront of any pipeline that you want to rebuild at runtime i.e. multi-tenent scenarios, or changing settings for security middleware.