Run cors middleware for testing routes
This commit is contained in:
parent
9592ba6cc4
commit
aa0b93e16b
3 changed files with 14 additions and 11 deletions
1
.github/workflows/dusk.yml
vendored
1
.github/workflows/dusk.yml
vendored
|
@ -7,7 +7,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
APP_URL: "http://127.0.0.1:8000"
|
APP_URL: "http://127.0.0.1:8000"
|
||||||
APP_ENV: dusk
|
APP_ENV: dusk
|
||||||
APP_CORS_ALLOWED_ORIGINS: "*"
|
|
||||||
DB_USERNAME: root
|
DB_USERNAME: root
|
||||||
DB_PASSWORD: root
|
DB_PASSWORD: root
|
||||||
MAIL_MAILER: log
|
MAIL_MAILER: log
|
||||||
|
|
|
@ -90,6 +90,7 @@ class Kernel extends HttpKernel
|
||||||
'auth' => Authenticate::class,
|
'auth' => Authenticate::class,
|
||||||
'auth.basic' => AuthenticateWithBasicAuth::class,
|
'auth.basic' => AuthenticateWithBasicAuth::class,
|
||||||
'auth.session' => AuthenticateSession::class,
|
'auth.session' => AuthenticateSession::class,
|
||||||
|
'cors' => HandleCors::class,
|
||||||
'guest' => RedirectIfAuthenticated::class,
|
'guest' => RedirectIfAuthenticated::class,
|
||||||
'csrf' => VerifyCsrfToken::class,
|
'csrf' => VerifyCsrfToken::class,
|
||||||
'throttle' => ThrottleRequests::class,
|
'throttle' => ThrottleRequests::class,
|
||||||
|
|
|
@ -118,6 +118,8 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Route::middleware('cors')->group(function () {
|
||||||
|
|
||||||
// Simulate Node Ping
|
// Simulate Node Ping
|
||||||
Route::get('/api/system', fn () => [
|
Route::get('/api/system', fn () => [
|
||||||
'version' => '1.7.0',
|
'version' => '1.7.0',
|
||||||
|
@ -129,5 +131,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
// Simulate Successful Server Creation
|
// Simulate Successful Server Creation
|
||||||
Route::post('/api/servers', fn () => []);
|
Route::post('/api/servers', fn () => []);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue