add time report gist

This commit is contained in:
Tommy Parnell
2019-11-07 06:21:14 -08:00
parent f4b095e29d
commit 1fef7a5032

View File

@@ -30,21 +30,22 @@ namespace TerribleDev
["react-samples"] = "https://github.com/terribledev/react-samples", ["react-samples"] = "https://github.com/terribledev/react-samples",
["react-sample"] = "https://github.com/terribledev/react-samples", ["react-sample"] = "https://github.com/terribledev/react-samples",
["things-to-know"] = "https://github.com/TerribleDev/Things-to-know", ["things-to-know"] = "https://github.com/TerribleDev/Things-to-know",
["code101"] = "https://github.com/NashuaCodes/Decks" ["code101"] = "https://github.com/NashuaCodes/Decks",
["webpack/timereport"] = "https://gist.github.com/TerribleDev/8677821c3e174659250df1f6bba9d7c3"
}; };
public static class redirectFunctionTrig public static class redirectFunctionTrig
{ {
[FunctionName("redirectFunctionTrig")] [FunctionName("redirectFunctionTrig")]
public static IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "{path}")] public static IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "{path}")]
HttpRequest req, HttpRequest req,
ILogger log, ILogger log,
string path) string path)
{ {
log.LogInformation($"redirect triggered: {DateTime.Now}"); log.LogInformation($"redirect triggered: {DateTime.Now}");
var name = path.ToString().TrimEnd('/'); var name = path.ToString().TrimEnd('/');
if(string.Equals(name, "livecheck")) if(string.Equals(name, "livecheck"))
{ {
req.HttpContext.Response.GetTypedHeaders().CacheControl = new Microsoft.Net.Http.Headers.CacheControlHeaderValue() { req.HttpContext.Response.GetTypedHeaders().CacheControl = new Microsoft.Net.Http.Headers.CacheControlHeaderValue() {
Private = true, Private = true,