mischasolaris / craft-health-check

Craft网站健康检查变得简单

安装: 2

依赖项: 0

建议者: 0

安全: 0

类型:craft-plugin

5.0.4 2024-08-09 19:36 UTC

This package is auto-updated.

Last update: 2024-09-09 19:52:42 UTC


README

Craft网站健康检查变得简单

要求

此插件需要Craft CMS 5.2.0或更高版本,以及PHP 8.2或更高版本。

安装

您可以从插件商店或使用Composer安装此插件。

从插件商店

转到项目控制面板中的插件商店,搜索“Craft Health Check”。然后按“安装”。

使用Composer

打开终端并运行以下命令

# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require mischasolaris/craft-health-check

# tell Craft to install the plugin
./craft plugin/install craft-health-check

用法

健康检查配置为需要秘密密码,这可以在控制面板中设置。作为一个简单的演示,您可以使用此表单获取健康检查测试的JSON响应

            <form method="post">
                {{ csrfInput() }}
                {{ actionInput('craft-health-check/health/check-results') }}

                <label for="loginName">Username or email</label>
                {{ input('text', 'craft-health-check-secret', null, {
                    id: 'secretCode',
                }) }}

                <button>Check</button>
            </form>