Skip to content

[Bug] API调用问题 #11415

@AmberKod

Description

@AmberKod

Contact Information

No response

1Panel Version

v1

Problem Description

背景:通过Apifox 调用1panel 的API接口,尝试了有无安全入口,都是返回以下错误:

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>暂时无法访问</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            background-color: #f9f9f9;
            margin: 0;
            padding: 0;
            color: #333;
        }

        .container {
            max-width: 600px;
            margin: 50px auto;
            padding: 20px;
            background: #fff;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        }

        .icon img {
            width: 100px;
            height: auto;
        }

        h1 {
            font-size: 24px;
            color: #555;
        }

        p {
            font-size: 16px;
            color: #666;
            line-height: 1.5;
        }

        .command {
            font-family: monospace;
            background: #f0f0f0;
            padding: 5px 10px;
            border-radius: 4px;
            display: inline-block;
            margin-top: 10px;
        }
    </style>
</head>

<body>
    <div class="container">
        <h1>暂时无法访问</h1>
        <p>当前环境已经开启了安全入口登录</p>
        <p>可在 SSH 终端输入以下命令来查看面板入口:</p>
        <p class="command">1pctl user-info</p>
    </div>
</body>

</html>

不确定是bug,还是我的调用方式有问题

Steps to Reproduce

请求链接:http://10.0.1.56:30000/api/v1/dashboard

The expected correct result

No response

Related log output

Additional Information

No response

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions