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

[Bug] After 1.10.22 LTS, accessing the admin panel through Cloudflare's CDN causes it to fail to load properly, and the HTML source code is displayed directly. #7457

Open
zhengkunwang223 opened this issue Dec 20, 2024 Discussed in #7432 · 2 comments

Comments

@zhengkunwang223
Copy link
Member

Discussed in #7432

Originally posted by 65003118 December 18, 2024

Contact Information

[email protected]

1Panel Version

v1.10.22-lts

Problem Description

[1Panel在1.10.22lts之后,通过CloudFlare的CDN打开后台无法正常加载,会直接把HTML源码写出来,例如

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta name="robots" content="noindex,nofollow" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <title>Loading...</title>
    <script type="module" src="/assets/js/main.js"></script>
    <link rel="stylesheet" href="/assets/css/style.css">
</head>
<body>
    <div id="app">
        <style>
            html, body, #app {
                width: 100%;
                height: 100%;
                padding: 0;
                margin: 0;
            }
            .first-loading-wrap {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                width: 100%;
                height: 100%;
            }
            .first-loading-wrap > h1 {
                font-size: 128px;
            }
            .first-loading-wrap .loading-wrap {
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 98px;
            }
            /* ... rest of the CSS remains unchanged as it's not sensitive ... */
        </style>
        <div class="first-loading-wrap">
            <div class="loading-wrap">
                <span class="dot dot-spin">
                    <i></i><i></i><i></i><i></i>
                </span>
            </div>
        </div>
    </div>
</body>
</html>

问题是浏览器没有报错,服务器也没有错误日志,只有再正常不过的访问日志
不通过CLoudFlare,直接SSL是完全没有问题的,所以我推断是CF的问题,但是CF所有的优化关掉和缓存清理掉,也没有用,WAF甚至是空的
但是也不认为是1Panel的问题,毕竟直接SSL完全没问题
1.10.21 lts之前的版本不会有这个问题
总结:
如果你说是CF的问题,那之前的版本没问题
如果你说是1Panel的问题,但是不走CF没问题
如果你说我服务器问题,两台都是这个情况
所以来求助一下开发者,v1.10.21-lts就不会有

Steps to Reproduce

首先使用CloudFlare CDN解析域名 例如A www.xxx.com 11.11.11.11 在11.11.11.11安装v1.10.22-lts的1Panel,通过OpenResty反代1Panel的端口,例如8443,增加安全入口.例如/safe。此时通过www.xxx.com/safe进行访问1Panel入口会打开一个没有任何渲染的HTML文档。
同理,即使使用1Panel自带的安全域名绑定和SSL绑定不会有什么本质区别

The expected correct result

应该正常打开1Panel后台入口

注:
在v1.10.22-lts之前的版本,例如v1.10.21-lts完全是正常的,之后的beta开始出现的问题
如果不通过CF的CDN也不会有这个问题,依然可以正常打开1Panel后台入口
但是CF没有WAF也没有优化,并且之前的版本例如v1.10.21-lts就算有WAF和优化也是正常的,也可以打开入口

Related log output

OpenResty没有错误日志,CDN处没有拦截日志

Additional Information

PixPin_2024-12-18_17-56-59

@wanghe-fit2cloud
Copy link
Member

Recent version improvements.

@WankkoRee
Copy link
Contributor

WankkoRee commented Dec 20, 2024

same issue for me.
v1.10.22 and Cloudflare.

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

No branches or pull requests

3 participants