Skip to content

Commit

Permalink
Disable composer autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schindler committed May 12, 2023
1 parent 4ecbf8b commit 830c7e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
const TITLE = 'sample'; // Title of project

// Require autoloaders
require_once('./core/ClassLoader.php'); // Load classes
require_once('../vendor/autoload.php'); // Composer autoloader
require_once('./core/ClassLoader.php'); // Load classes
// require_once('../vendor/autoload.php'); // Composer autoloader (currently doesn't work with docker)

// Application start
// session_start(); // Start PHP Session
Expand Down
2 changes: 1 addition & 1 deletion src/views/base/APIView.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function render(): void
header('Content-Type: application/json; charset=utf-8');
header('Access-Control-Allow-Origin: ' . DOMAIN);
header('Access-Control-Allow-Headers: Authorization, Origin, X-Requested-With, Content-Type, Accept');
header('Access-Control-Max-Age: ' . $this->maxAge);
header('Access-Control-Max-Age: ' . $this->maxAge); // Preflight cache max age

echo json_encode($this->data);
}
Expand Down

0 comments on commit 830c7e2

Please sign in to comment.