1Panel icon indicating copy to clipboard operation
1Panel copied to clipboard

[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.

Open zhengkunwang223 opened this issue 1 year ago • 4 comments

Discussed in https://github.com/1Panel-dev/1Panel/discussions/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

zhengkunwang223 avatar Dec 20 '24 02:12 zhengkunwang223

Recent version improvements.

wanghe-fit2cloud avatar Dec 20 '24 03:12 wanghe-fit2cloud

same issue for me. v1.10.22 and Cloudflare.

WankkoRee avatar Dec 20 '24 07:12 WankkoRee

我也有同样的问题在v1.10.22,而且我没有使用cloudflare,之前的版本也都是正常的。

forever-lwy avatar Dec 28 '24 04:12 forever-lwy

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I also have the same problem in v1.10.22, and I don't use cloudflare. Previous versions were also normal.

wanghe-fit2cloud avatar Dec 28 '24 04:12 wanghe-fit2cloud

v1.10.23-lts 版本已发布。

wanghe-fit2cloud avatar Jan 10 '25 07:01 wanghe-fit2cloud