mirror of
https://github.com/JGH0/Todo-App-Backend.git
synced 2026-06-03 13:28:47 +02:00
some shit
This commit is contained in:
@@ -34,11 +34,7 @@ class Cors extends BaseConfig
|
|||||||
* - ['http://localhost:8080']
|
* - ['http://localhost:8080']
|
||||||
* - ['https://www.example.com']
|
* - ['https://www.example.com']
|
||||||
*/
|
*/
|
||||||
<<<<<<< HEAD
|
|
||||||
'allowedOrigins' => ['http://localhost:5173', 'http://127.0.0.1:5173'],
|
|
||||||
=======
|
|
||||||
'allowedOrigins' => ['http://localhost:5173', 'http://127.0.0.1:5173', 'http://localhost'],
|
'allowedOrigins' => ['http://localhost:5173', 'http://127.0.0.1:5173', 'http://localhost'],
|
||||||
>>>>>>> main
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Origin regex patterns for the `Access-Control-Allow-Origin` header.
|
* Origin regex patterns for the `Access-Control-Allow-Origin` header.
|
||||||
@@ -72,11 +68,7 @@ class Cors extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
|
||||||
*/
|
*/
|
||||||
<<<<<<< HEAD
|
|
||||||
'allowedHeaders' => ['*'],
|
|
||||||
=======
|
|
||||||
'allowedHeaders' => ['Content-Type', 'Authorization', 'X-API-Key'],
|
'allowedHeaders' => ['Content-Type', 'Authorization', 'X-API-Key'],
|
||||||
>>>>>>> main
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set headers to expose.
|
* Set headers to expose.
|
||||||
@@ -101,11 +93,7 @@ class Cors extends BaseConfig
|
|||||||
*
|
*
|
||||||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
|
||||||
*/
|
*/
|
||||||
<<<<<<< HEAD
|
|
||||||
'allowedMethods' => ['*'],
|
|
||||||
=======
|
|
||||||
'allowedMethods' => ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
|
'allowedMethods' => ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
|
||||||
>>>>>>> main
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set how many seconds the results of a preflight request can be cached.
|
* Set how many seconds the results of a preflight request can be cached.
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ use CodeIgniter\Router\RouteCollection;
|
|||||||
*/
|
*/
|
||||||
$routes->get('/', 'Home::index');
|
$routes->get('/', 'Home::index');
|
||||||
$routes->get('/themes', 'ThemeStore::index');
|
$routes->get('/themes', 'ThemeStore::index');
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
$routes->post('/themes/upload', 'ThemeStore::upload');
|
$routes->post('/themes/upload', 'ThemeStore::upload');
|
||||||
$routes->get('/themes/preview/(:segment)', 'ThemeStore::preview/$1');
|
$routes->get('/themes/preview/(:segment)', 'ThemeStore::preview/$1');
|
||||||
|
|
||||||
@@ -92,7 +90,6 @@ $routes->group('api/v1', ['namespace' => 'App\Controllers\Api\V1', 'filter' => [
|
|||||||
$routes->delete('user/themes/(:segment)', 'UserThemeController::delete/$1');
|
$routes->delete('user/themes/(:segment)', 'UserThemeController::delete/$1');
|
||||||
});
|
});
|
||||||
$routes->get('/themes', 'ThemeStore::index');
|
$routes->get('/themes', 'ThemeStore::index');
|
||||||
>>>>>>> main
|
|
||||||
$routes->options('/themes', static function () {
|
$routes->options('/themes', static function () {
|
||||||
header('Access-Control-Allow-Origin: http://localhost:5173');
|
header('Access-Control-Allow-Origin: http://localhost:5173');
|
||||||
header('Access-Control-Allow-Methods: GET, OPTIONS');
|
header('Access-Control-Allow-Methods: GET, OPTIONS');
|
||||||
@@ -109,11 +106,3 @@ $routes->options('/themes/upload', static function () {
|
|||||||
return response()->setStatusCode(204);
|
return response()->setStatusCode(204);
|
||||||
});
|
});
|
||||||
$routes->get('/themes/preview/(:segment)', 'ThemeStore::preview/$1');
|
$routes->get('/themes/preview/(:segment)', 'ThemeStore::preview/$1');
|
||||||
<<<<<<< HEAD
|
|
||||||
$routes->post('/themes/install/(:segment)', 'ThemeStore::install/$1');
|
|
||||||
$routes->post('/themes/activate/(:segment)', 'ThemeStore::activate/$1');
|
|
||||||
$routes->delete('/themes/uninstall/(:segment)', 'ThemeStore::uninstall/$1');
|
|
||||||
$routes->get('/themes/my-themes', 'ThemeStore::myThemes');
|
|
||||||
$routes->get('/themes/(:segment)', 'ThemeStore::serveCss/$1');
|
|
||||||
=======
|
|
||||||
>>>>>>> main
|
|
||||||
|
|||||||
Reference in New Issue
Block a user