feat:examples:up middleware

This commit is contained in:
liujian 2021-08-16 15:08:20 +08:00
parent 120b7b8209
commit c1c403980c
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class Auth
/**
* @return \Closure
*/
public function middleware(): \Closure
public static function middleware(): \Closure
{
return function (Context $ctx) {
try {

View File

@ -14,7 +14,7 @@ class Cors
/**
* @return \Closure
*/
public function middleware(): \Closure
public static function middleware(): \Closure
{
return function (Context $ctx) {
$ctx->setHeader('Access-Control-Allow-Origin', '*');