Skip to content

Disable automatic HTTPS upgrade for mixed content in Electron app - #17994

Merged
88250 merged 1 commit into
siyuan-note:devfrom
TCOTC:fix/automatic-HTTPS
Jun 30, 2026
Merged

Disable automatic HTTPS upgrade for mixed content in Electron app#17994
88250 merged 1 commit into
siyuan-note:devfrom
TCOTC:fix/automatic-HTTPS

Conversation

@TCOTC

@TCOTC TCOTC commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description / 描述

本地客户端使用 HTTPS 之后,用户的七牛云的图片无法显示了,原因是图片链接的 HTTP 协议自动升级为了 HTTPS:

PixPin_2026-06-30_14-13-22 PixPin_2026-06-30_14-14-12

本 PR 更改之后图片能显示,但控制台会出现警告,是正常现象,我没有找到办法能消除警告:

Mixed Content: The page at 'https://127.0.0.1:6806/stage/build/app/?v=1782796769894' was loaded over HTTPS, but requested an insecure image 'http://abcdefg.hn-bkt.clouddn.com/PixPin_2026-06-30_13-05-34.png'. This content should also be served over HTTPS

Type of change / 变更类型

  • Bug fix
    缺陷修复
  • Refactoring
    代码重构
  • New feature
    新功能
  • Text updates or new language additions
    修改文案或增加新语言

Checklist / 检查清单

  • I have performed a self-review of my own code
    我对自己的代码进行了自我审查
  • I have full rights to the submitted code and agree to license it under this project's AGPL-3.0 license
    我拥有所提交代码的完整权利,并同意其以本项目的 AGPL-3.0 许可证授权
  • PR is submitted to the dev branch and has no merge conflicts
    PR 提交到 dev 分支,并且没有合并冲突

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 针对 Electron 桌面端在本地启用 HTTPS 后,HTTP 外链图片被 Chromium 自动升级为 HTTPS 导致加载失败的问题,通过关闭对应的 Mixed Content 自动升级特性来恢复图片可见性(控制台 Mixed Content 警告仍会出现)。

Changes:

  • 在 Electron 启动参数中禁用 Chromium 的 AutoupgradeMixedContent 特性,阻止 HTTP 资源被自动升级为 HTTPS。

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@88250 88250 added this to the 3.7.1 milestone Jun 30, 2026
@88250
88250 merged commit f133f45 into siyuan-note:dev Jun 30, 2026
1 check passed
@TCOTC
TCOTC deleted the fix/automatic-HTTPS branch June 30, 2026 08:36
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants