Created
April 8, 2019 13:09
-
-
Save enkelmedia/629012286eb20173b471963cae40e35a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Just used to record an incomming request to see any headers passed from CloudFront to the Win2012-server. | |
/// Routes to: /umbraco/surface/contactmesurface/recordrequest | |
/// </summary> | |
/// <returns></returns> | |
public ActionResult RecordRequest() | |
{ | |
var path = Server.MapPath("~/app_data/logs/") + DateTime.Now.ToString("yyyyMMdd-hhmmss_") + ".txt"; | |
string headers = String.Empty; | |
foreach (var key in Request.Headers.AllKeys) | |
headers += key + "=" + Request.Headers[key] + Environment.NewLine; | |
System.IO.File.WriteAllText(path,headers); | |
return Content("Yess"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment