![](/img/trans.png)
[英]reading the value of header in response X-XSS-protection response header
[英]Is response header “X-XSS-Protection” supported in jsp 1.2?
我正在嘗試將標題“ X-XSS-Protection”添加到jsp的響應對象中。
我在jsp中的代碼...
<%
response.addHeader("X-XSS-Protection","1; mode=block");
System.out.println("!!!!!!!!!Testing X-XSS "+response.containsHeader("X-XSS-Protection"));
%>
在控制台上,我得到以下結果。
!!!!!!!!!測試X-XSS否
這通常意味着響應的一部分已經被寫入,因此添加標頭為時已晚。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.