Defaults

Defaults

The Defaults() method provided by the Practices module adds some useful concerns to your web server to enable features such as compression or client side caching. This way, you will have a well configured server instance without the need of adding everything by yourself.

Host.Create()
        .Handler(...)
        .Defaults()
        .Run();
    

If you would like to opt out of a default feature, you may pass a flag as needed:

Host.Create()
        .Handler(...)
        .Defaults(compression: false)
        .Run();