..
This commit is contained in:
@@ -36,6 +36,18 @@ namespace VNCServerList.Web
|
||||
};
|
||||
|
||||
app.UseFileServer(options);
|
||||
|
||||
// 캐시 방지 미들웨어 추가
|
||||
app.Use(async (context, next) =>
|
||||
{
|
||||
if (context.Request.Path.Value.EndsWith(".js") || context.Request.Path.Value.EndsWith(".css"))
|
||||
{
|
||||
context.Response.Headers["Cache-Control"] = "no-cache, no-store, must-revalidate";
|
||||
context.Response.Headers["Pragma"] = "no-cache";
|
||||
context.Response.Headers["Expires"] = "0";
|
||||
}
|
||||
await next();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user