Added the files from MVP

This commit is contained in:
Jepp9350
2024-12-16 08:54:03 +01:00
parent b831ad9332
commit 914f5ba1b0
56 changed files with 4697 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace routes;
use traits\route_t;
class optionsRoute
{
use route_t;
public function run(): void
{
// When the OPTIONS method is requested, accept all using regex
$this->options('/.*', function () {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: *');
header('Content-Type: application/json');
http_response_code(200);
});
}
}