[英]MVC4 add header to redirect response does not work
在調試以下代碼時,我看到添加了標題:
System.Web.HttpContext.Current.Response.AppendHeader("Authorization", "Value");
System.Web.HttpContext.Current.Response.Redirect(redirectUrl);
但是它在最終的HTTP請求中不存在。
重定向將終止設置了標頭值的當前請求。
由於是新請求,因此不存在標頭。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.