0
私は、単一ページのHTMLアプリケーションを提供するための簡単な開発Webサーバーを提供するために、OWIN自己ホストアプリケーションを用意しました。私はJavaScriptを外部から編集しているので、(キャッシュがキャッシュされないように)すぐに期限切れのキャッシュヘッダーを送り返すようにサーバーに指示する必要があります。.net Owinキャッシングなしのセルフホスト
スタートアップに何を追加する必要がありますか(このサーバーはファイルブラウジングが有効になっています)。
class Startup
{
public void Configuration(IAppBuilder app)
{
var hubConfiguration = new HubConfiguration();
hubConfiguration.EnableDetailedErrors = (Tools.DebugLevel > 10);
hubConfiguration.EnableJavaScriptProxies = true;
app.UseCors(CorsOptions.AllowAll);
//app.UseStaticFiles();
app.UseFileServer(new FileServerOptions()
{
//RequestPath = new PathString("/Scopes"),
EnableDirectoryBrowsing = true,
FileSystem = new PhysicalFileSystem(@".\Scopes"),
});
app.MapSignalR("/signalr", hubConfiguration);
}
}