NuGet package | Owin.Framework.DefaultDocument |
GitHub source | OwinFramework.DefaultDocument |
builder.Register(ninject.Get<OwinFramework.DefaultDocument.DefaultDocumentMiddleware>()) .As("Default document") .ConfigureWith(config, "/owinFramework/middleware/defaultDocument");
The configuration below is the configuration you will get by default if you do not provide a configuration for this middleware.
{ "owinFramework": { "middleware": { "defaultDocument": { "documentationRootUrl": "/owin/defaultDocument/config", "enabled": true, "defaultPage": "/index.html", "paths": null } } } }
To configure default documents for sub-folders you can pass an array of paths like this:
{ "owinFramework": { "middleware": { "defaultDocument": { "documentationRootUrl": "/owin/defaultDocument/config", "enabled": true, "defaultPage": "/index.html", "paths": [ { "path": "/ui", "defaultPage": "/ui/index.html" }, { "path": "/api", "defaultPage": "/api/index.json" } ] } } } }