hyperf-chat/config/autoload/middlewares.php

25 lines
444 B
PHP
Raw Permalink Normal View History

2020-11-02 22:45:37 +08:00
<?php
declare(strict_types=1);
2020-11-07 22:57:10 +08:00
2020-11-02 22:45:37 +08:00
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
2020-11-07 22:57:10 +08:00
use App\Middleware\CorsMiddleware;
use App\Middleware\WebSocketAuthMiddleware;
2020-11-02 22:45:37 +08:00
return [
'http' => [
2020-11-07 22:57:10 +08:00
CorsMiddleware::class
2020-11-02 22:45:37 +08:00
],
2020-11-07 22:57:10 +08:00
'ws' => [
2020-11-24 23:23:12 +08:00
WebSocketAuthMiddleware::class
2020-11-07 22:57:10 +08:00
]
2020-11-02 22:45:37 +08:00
];