This commit is contained in:
2025-03-17 13:10:11 +08:00
parent 99abeea2e2
commit e3e9d990bb
6 changed files with 66 additions and 4 deletions
+9
View File
@@ -14,6 +14,15 @@
use Webman\Route;
// 拦截所有OPTIONS请求并直接响应
//Route::options('[{path:.+}]', function () {
// return response('', 204)
// ->withHeaders(['Content-Type' => 'text/plain']);
//});
// 登录接口
Route::any('/login', [app\controller\UserController::class, 'login'])->middleware([app\middleware\CrossDomain::class]);
// 文件上传接口
Route::post('/upload', [app\controller\UploadController::class, 'upload']);