Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 erupt-magic-api 组件,当系统中使用了https时,访问 接口配置页面无法打开 #283

Open
cdredfox opened this issue Dec 6, 2024 · 2 comments

Comments

@cdredfox
Copy link

cdredfox commented Dec 6, 2024

版本情况

JDK版本:jdk 1.8.0_421-b091
erupt版本: 1.11.7 最新版依然有该问题

问题描述(包括截图)

使用 erupt-magic-api 组件,当系统中使用了https时,访问 接口配置页面无法打开.

  1. 使用环境
    erupt 是部署在 k8s 中的一个 pod,k8s 中的 service 的访问地址是:http://aaaaa.com,然后外面请求的时候通过 nginx 转发,是带 https 的。

  2. 堆栈信息

查看浏览器控制台的错误 :
magic-api.ftl:38 Mixed Content: The page at 'https://aaaaa.com/#/tpl/magic-api.ftl' was loaded over HTTPS, but requested an insecure frame 'http://aaaaa.com/appdata/magic/web/index.html'. This request has been blocked; the content must be served over HTTPS.

  1. 测试涉及到的文件(注意脱密)
@erupts
Copy link
Owner

erupts commented Dec 20, 2024

建议换个浏览器试下

@cdredfox
Copy link
Author

不是浏览器的问题,而是 nginx 转发时 是 https 的地址,而在 pod 中是 http 的地址,而在 magic-api.ftl 这个页面中,引入的 index.html 是通过 requestContext 直接获取的,所以获取到的是 http 开头的地址,导致无法访问报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants