mineadmin / MineAdmin

🎉🎉🎉 MineAdmin是基于Hyperf框架 和 Vue3+Vite5 开发的前后端分离权限管理系统,自适应多终端。特色:后端 crud 生成 + 前端低代码 json 化配置

Home Page:https://www.mineadmin.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] header 头

okami-chen opened this issue · comments

Before you submit this issue

建议删除Server 或者自行配置

Describe your question

    public function success(string $message = null, array|object $data = [], int $code = 200): ResponseInterface
    {
        $format = [
            'requestId' => RequestIdHolder::getId(),
            'success' => true,
            'message' => $message ?: t('mineadmin.response_success'),
            'code' => $code,
            'data' => &$data,
        ];
        $format = $this->toJson($format);
        return $this->getResponse()
            ->withHeader('Server', 'MineAdmin')
            ->withAddedHeader('content-type', 'application/json; charset=utf-8')
            ->withBody(new SwooleStream($format));
    }