<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic [Developer Tools] HTTP + Secure Cookie 被拒绝时，Console 未显示明确的警告信息 in Discussions</title>
    <link>https://connect.mozilla.org/t5/discussions/developer-tools-http-secure-cookie-%E8%A2%AB%E6%8B%92%E7%BB%9D%E6%97%B6-console-%E6%9C%AA%E6%98%BE%E7%A4%BA%E6%98%8E%E7%A1%AE%E7%9A%84%E8%AD%A6%E5%91%8A%E4%BF%A1%E6%81%AF/m-p/123371#M48521</link>
    <description>&lt;P&gt;## 反馈内容&lt;/P&gt;&lt;P&gt;**问题描述：**&lt;/P&gt;&lt;P&gt;当服务器返回的 Set-Cookie 响应头中包含 Secure 属性，但当前连接是 HTTP（非 HTTPS）时，浏览器应拒绝设置该 Cookie。在此场景下，Edge/Chrome 会在开发者工具的 Console 中输出明确的警告信息，告知开发者 Cookie 因 Secure 属性且未通过安全连接而被阻止。而 Firefox 目前没有显示任何提示，导致开发者难以定位问题。&lt;/P&gt;&lt;P&gt;**复现步骤：**&lt;/P&gt;&lt;P&gt;1. 使用 Spring Boot + Druid 或任何会返回 Secure Cookie 的 Web 应用&lt;BR /&gt;2. 通过 HTTP 协议访问（例如 &lt;A href="http://192.168.x.x:8080）" target="_blank"&gt;http://192.168.x.x:8080）&lt;/A&gt;&lt;BR /&gt;3. 触发登录请求，服务器返回带有 Secure 属性的 Set-Cookie&lt;BR /&gt;4. 打开浏览器开发者工具（F12），查看 Console 标签页&lt;BR /&gt;5. 观察是否有关于 Cookie 被拒绝的提示&lt;/P&gt;&lt;P&gt;**实际结果（Firefox）：**&lt;/P&gt;&lt;P&gt;Console 中没有显示任何与 Cookie 被拒绝相关的警告或错误信息。开发者仅能从 Cookie 未被保存的现象推测问题，排查效率低下。实际显示此提交没有返回。&lt;/P&gt;&lt;P&gt;**预期结果：**&lt;/P&gt;&lt;P&gt;Firefox 应像 Edge/Chrome 一样，在 Console 中输出明确的警告信息，例如：&lt;/P&gt;&lt;P&gt;"Cookie “JSESSIONID” has been rejected because it has the “Secure” attribute but is not sent over a secure HTTPS connection."&lt;/P&gt;&lt;P&gt;或者类似 Chromium 的提示：&lt;/P&gt;&lt;P&gt;"Set-Cookie was blocked because it had the "Secure" attribute but was not received over a secure connection."&lt;/P&gt;&lt;P&gt;**对比参考（Edge/Chrome 的表现）：**&lt;/P&gt;&lt;P&gt;Edge 开发者工具 Console 中会显示如下内容：&lt;/P&gt;&lt;P&gt;&amp;gt; Cookie 被阻止，因为它具有 "Secure" 属性，但未通过安全连接发送。Access-Control-Request-Method&lt;/P&gt;&lt;P&gt;**影响范围：**&lt;/P&gt;&lt;P&gt;- 任何在 HTTP 连接下返回 Secure Cookie 的 Web 应用&lt;BR /&gt;- 特别是开发调试阶段，开发者经常使用 HTTP + IP 地址进行测试&lt;BR /&gt;- 该问题会显著增加此类问题的排查难度&lt;/P&gt;&lt;P&gt;**建议改进：**&lt;/P&gt;&lt;P&gt;在 Firefox 开发者工具的 Console 中增加对 Set-Cookie 因 Secure 属性（以及 SameSite 等其他安全属性）被拒绝的明确警告提示，与 Chromium 系浏览器保持一致的开发者体验。&lt;/P&gt;&lt;P&gt;**环境信息：**&lt;/P&gt;&lt;P&gt;- 操作系统：Windows 11&lt;BR /&gt;- Firefox 版本：请填写你当前使用的版本号&lt;BR /&gt;- 其他浏览器版本（对比用）：Edge 版本号&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fengfan2889_0-1776842187799.png" style="width: 400px;"&gt;&lt;img src="https://connect.mozilla.org/t5/image/serverpage/image-id/14217iA23B29B13779CA9F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="fengfan2889_0-1776842187799.png" alt="fengfan2889_0-1776842187799.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Apr 2026 07:16:35 GMT</pubDate>
    <dc:creator>fengfan2889</dc:creator>
    <dc:date>2026-04-22T07:16:35Z</dc:date>
    <item>
      <title>[Developer Tools] HTTP + Secure Cookie 被拒绝时，Console 未显示明确的警告信息</title>
      <link>https://connect.mozilla.org/t5/discussions/developer-tools-http-secure-cookie-%E8%A2%AB%E6%8B%92%E7%BB%9D%E6%97%B6-console-%E6%9C%AA%E6%98%BE%E7%A4%BA%E6%98%8E%E7%A1%AE%E7%9A%84%E8%AD%A6%E5%91%8A%E4%BF%A1%E6%81%AF/m-p/123371#M48521</link>
      <description>&lt;P&gt;## 反馈内容&lt;/P&gt;&lt;P&gt;**问题描述：**&lt;/P&gt;&lt;P&gt;当服务器返回的 Set-Cookie 响应头中包含 Secure 属性，但当前连接是 HTTP（非 HTTPS）时，浏览器应拒绝设置该 Cookie。在此场景下，Edge/Chrome 会在开发者工具的 Console 中输出明确的警告信息，告知开发者 Cookie 因 Secure 属性且未通过安全连接而被阻止。而 Firefox 目前没有显示任何提示，导致开发者难以定位问题。&lt;/P&gt;&lt;P&gt;**复现步骤：**&lt;/P&gt;&lt;P&gt;1. 使用 Spring Boot + Druid 或任何会返回 Secure Cookie 的 Web 应用&lt;BR /&gt;2. 通过 HTTP 协议访问（例如 &lt;A href="http://192.168.x.x:8080）" target="_blank"&gt;http://192.168.x.x:8080）&lt;/A&gt;&lt;BR /&gt;3. 触发登录请求，服务器返回带有 Secure 属性的 Set-Cookie&lt;BR /&gt;4. 打开浏览器开发者工具（F12），查看 Console 标签页&lt;BR /&gt;5. 观察是否有关于 Cookie 被拒绝的提示&lt;/P&gt;&lt;P&gt;**实际结果（Firefox）：**&lt;/P&gt;&lt;P&gt;Console 中没有显示任何与 Cookie 被拒绝相关的警告或错误信息。开发者仅能从 Cookie 未被保存的现象推测问题，排查效率低下。实际显示此提交没有返回。&lt;/P&gt;&lt;P&gt;**预期结果：**&lt;/P&gt;&lt;P&gt;Firefox 应像 Edge/Chrome 一样，在 Console 中输出明确的警告信息，例如：&lt;/P&gt;&lt;P&gt;"Cookie “JSESSIONID” has been rejected because it has the “Secure” attribute but is not sent over a secure HTTPS connection."&lt;/P&gt;&lt;P&gt;或者类似 Chromium 的提示：&lt;/P&gt;&lt;P&gt;"Set-Cookie was blocked because it had the "Secure" attribute but was not received over a secure connection."&lt;/P&gt;&lt;P&gt;**对比参考（Edge/Chrome 的表现）：**&lt;/P&gt;&lt;P&gt;Edge 开发者工具 Console 中会显示如下内容：&lt;/P&gt;&lt;P&gt;&amp;gt; Cookie 被阻止，因为它具有 "Secure" 属性，但未通过安全连接发送。Access-Control-Request-Method&lt;/P&gt;&lt;P&gt;**影响范围：**&lt;/P&gt;&lt;P&gt;- 任何在 HTTP 连接下返回 Secure Cookie 的 Web 应用&lt;BR /&gt;- 特别是开发调试阶段，开发者经常使用 HTTP + IP 地址进行测试&lt;BR /&gt;- 该问题会显著增加此类问题的排查难度&lt;/P&gt;&lt;P&gt;**建议改进：**&lt;/P&gt;&lt;P&gt;在 Firefox 开发者工具的 Console 中增加对 Set-Cookie 因 Secure 属性（以及 SameSite 等其他安全属性）被拒绝的明确警告提示，与 Chromium 系浏览器保持一致的开发者体验。&lt;/P&gt;&lt;P&gt;**环境信息：**&lt;/P&gt;&lt;P&gt;- 操作系统：Windows 11&lt;BR /&gt;- Firefox 版本：请填写你当前使用的版本号&lt;BR /&gt;- 其他浏览器版本（对比用）：Edge 版本号&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fengfan2889_0-1776842187799.png" style="width: 400px;"&gt;&lt;img src="https://connect.mozilla.org/t5/image/serverpage/image-id/14217iA23B29B13779CA9F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="fengfan2889_0-1776842187799.png" alt="fengfan2889_0-1776842187799.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2026 07:16:35 GMT</pubDate>
      <guid>https://connect.mozilla.org/t5/discussions/developer-tools-http-secure-cookie-%E8%A2%AB%E6%8B%92%E7%BB%9D%E6%97%B6-console-%E6%9C%AA%E6%98%BE%E7%A4%BA%E6%98%8E%E7%A1%AE%E7%9A%84%E8%AD%A6%E5%91%8A%E4%BF%A1%E6%81%AF/m-p/123371#M48521</guid>
      <dc:creator>fengfan2889</dc:creator>
      <dc:date>2026-04-22T07:16:35Z</dc:date>
    </item>
  </channel>
</rss>

