Skip to content

Commit

Permalink
fix dir & add config cors
Browse files Browse the repository at this point in the history
  • Loading branch information
NacerKH committed Mar 30, 2023
1 parent db1e1db commit 445ebaa
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 94 deletions.
94 changes: 0 additions & 94 deletions app/Http/Controllers/API/admin/UserController.php

This file was deleted.

41 changes: 41 additions & 0 deletions config/cors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/

'paths' => [
'api/*',
'admin/*',
'/*',
'register',
'sanctum/csrf-cookie',

],

'allowed_methods' => ['*'],

'allowed_origins' => ['*'],

'allowed_origins_patterns' => [''],

'allowed_headers' => ['*'],

'exposed_headers' => [],

'max_age' => 0,

'supports_credentials' => true,

];
1 change: 1 addition & 0 deletions routes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
Route::post('/logout', [AuthController::class, 'logout']);
Route::get('/verify-email/{id}/{hash}', [VerificationController::class, 'verify'])->name('admin.verification.verify');;
Route::post('/verify-resend', [VerificationController::class, 'resend']);
Route::get('/getinfo', [AdminUserController::class, 'getInfo'])->name('user.get.info');

## Update user informations Profil & Password
Route::post('/updateUserInformationProfil',[UserController::class, 'update'])->name('admin.updateProfil');
Expand Down

0 comments on commit 445ebaa

Please sign in to comment.