mirror of
https://gitee.com/mix-php/mix.git
synced 2024-12-03 12:17:39 +08:00
feat:examples:up middleware
This commit is contained in:
parent
120b7b8209
commit
c1c403980c
@ -15,7 +15,7 @@ class Auth
|
||||
/**
|
||||
* @return \Closure
|
||||
*/
|
||||
public function middleware(): \Closure
|
||||
public static function middleware(): \Closure
|
||||
{
|
||||
return function (Context $ctx) {
|
||||
try {
|
||||
|
@ -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', '*');
|
||||
|
Loading…
Reference in New Issue
Block a user