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.
await Host.Create()
.Handler(...)
.Defaults()
.RunAsync();
If you would like to opt out of a default feature, you may pass a flag as needed:
await Host.Create()
.Handler(...)
.Defaults(compression: false)
.RunAsync();