如何使用带有自定义身份验证的 HTTP 响应 header

How to use HTTP response with custom authentication header

我想做的是使用我的自定义 http header 向浏览器发送 http 响应。我希望浏览器每次发出请求时都能将该自定义 http 头传回 Web 服务器。 但事实并非如此。

我正在使用 C# ASP.net MVC。 当我 return 我的自定义 ActionResult.

public override void ExecuteResult(ControllerContext context)
{
            base.ExecuteResult(context);
            context.HttpContext.Response.AppendHeader("AuthenticationInfo", "1234567890");
}

我需要做的是响应 HTTP header 作为 cookie。