From e850d14c2b5f9c7124ff611a165246683b1279a6 Mon Sep 17 00:00:00 2001 From: Kilian Hofmann Date: Sat, 27 Jul 2024 19:06:38 +0200 Subject: [PATCH] CORS --- exam/routes/routes.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/exam/routes/routes.php b/exam/routes/routes.php index 1d96da6..ccb5575 100644 --- a/exam/routes/routes.php +++ b/exam/routes/routes.php @@ -58,6 +58,12 @@ SimpleRouter::group(["middleware" => Khofmann\Auth\Auth::class], function () { SimpleRouter::patch("/users/self", [Api\Users\Users::class, "patchSelf"]); // Update image self SimpleRouter::patch("/users/self/image", function () { + Response::response() + ->header("Cache-control: no-cache") + ->header("Access-Control-Allow-Origin: *") + ->header("Access-Control-Allow-Methods: *") + ->header("Access-Control-Allow-Headers: *"); + print_r(Input::file("image")); echo "\n"; print_r(Input::patch("predefined"));