SelectPdf for .NET - Helper Page - View HTTP Headers - C# / ASP.NET MVC Sample

This page shows the HTTP Headers sent to it:

Cache-Control: max-age=259200
Connection: keep-alive
Via: 1.1 squid-proxy-5b96dc6d46-r9qb2 (squid/6.13)
Accept: */*
Accept-Encoding: gzip, br, zstd, deflate
Host: selectpdf.com
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
X-Forwarded-For: 10.3.7.206

Sample code · C#
using System.Web.Mvc;
using System.Configuration;
namespace SelectPdf.Samples.Controllers
{
    public class ViewHttpHeadersController : Controller
    {
        // GET: ViewHttpHeaders
        public ActionResult Index()
        {
            string headers = string.Empty;
            foreach (string name in Request.Headers)
            {
                string value = Request.Headers[name];
                headers += "<br/>" + name + ": " + value;
            }

            ViewData.Add("HeadersValue", headers);
            
            return View();
        }
    }
}