Spaces:
Running
Running
Download app/Http/Middleware/CorsMiddleware.php from lisatthu35/ewa: direct link, hf CLI and curl.
- Browser
- Download file 526 Bytes
-
https://huggingface.co/spaces/lisatthu35/ewa/resolve/main/app/Http/Middleware/CorsMiddleware.php
- Command line
-
hf download hf://spaces/lisatthu35/ewa/app/Http/Middleware/CorsMiddleware.php
-
curl -L -o CorsMiddleware.php https://huggingface.co/spaces/lisatthu35/ewa/resolve/main/app/Http/Middleware/CorsMiddleware.php
526 Bytes
| namespace App\Http\Middleware; | |
| use Closure; | |
| class CorsMiddleware | |
| { | |
| /** | |
| * Handle an incoming request. | |
| * | |
| * @param \Illuminate\Http\Request $request | |
| * @param \Closure $next | |
| * @return mixed | |
| */ | |
| public function handle($request, Closure $next) | |
| { | |
| return $next($request) | |
| ->header('Access-Control-Allow-Origin', '*') | |
| ->header('Access-Control-Allow-Methods', '*') | |
| ->header('Access-Control-Allow-Credentials', 'true') | |
| ; | |
| } | |
| } | |