fix: 修复验证链接协议为http并添加API根路径处理
修复开发者注册邮件验证链接错误使用https协议的问题,改为使用http协议 在API入口添加根路径处理,返回可用端点信息和示例 添加数据库查询错误处理,返回500状态码和错误信息
This commit is contained in:
@@ -98,7 +98,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$error = '系统错误,请稍后再试';
|
||||
} else {
|
||||
// 生成验证链接
|
||||
$verificationLink = 'https://' . $_SERVER['HTTP_HOST'] . '/developer/verify_email.php?token=' . urlencode($verificationToken);
|
||||
$verificationLink = 'http://' . $_SERVER['HTTP_HOST'] . '/developer/verify_email.php?token=' . urlencode($verificationToken);
|
||||
|
||||
// 加载邮件模板
|
||||
$templatePath = __DIR__ . '/../mail/verification_template.php';
|
||||
|
||||
Reference in New Issue
Block a user