1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

made the graphs load faster

fixed issues with stats page
made the pages json request faster
This commit is contained in:
RaidMax
2017-10-04 18:01:04 -05:00
parent 9758e72f6b
commit d8b19f289a
11 changed files with 137 additions and 129 deletions

View File

@ -54,6 +54,7 @@ namespace IW4MAdmin
if (requestedPage.content != null && requestedPage.content.GetType() != typeof(string))
requestedPage.content = Newtonsoft.Json.JsonConvert.SerializeObject(requestedPage.content);
string maxAge = requestedPage.contentType == "application/json" ? "0" : "31536000";
var headers = new HttpResponseHead()
{
Status = "200 OK",
@ -62,6 +63,7 @@ namespace IW4MAdmin
{ "Content-Type", requestedPage.contentType },
{ "Content-Length", binaryContent ? requestedPage.BinaryContent.Length.ToString() : requestedPage.content.ToString().Length.ToString() },
{ "Access-Control-Allow-Origin", "*" },
{ "Cache-Control", $"public,max-age={maxAge}"}
}
};