Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
2e75db755e
1 file changed
+9
@@ -59,6 +59,10 @@
|
|||||||
public static function output($data): void
|
public static function output($data): void
|
||||||
{
|
{
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
header('Access-Control-Allow-Origin: *');
|
||||||
|
header('Access-Control-Allow-Credentials: true');
|
||||||
|
header('Access-Control-Allow-Methods: *');
|
||||||
|
header('Access-Control-Allow-Headers: *');
|
||||||
echo json_encode(
|
echo json_encode(
|
||||||
[
|
[
|
||||||
'success' => true,
|
'success' => true,
|
||||||
@@ -78,6 +82,11 @@
|
|||||||
*/
|
*/
|
||||||
public static function outputError (Throwable $exception): void
|
public static function outputError (Throwable $exception): void
|
||||||
{
|
{
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
header('Access-Control-Allow-Origin: *');
|
||||||
|
header('Access-Control-Allow-Credentials: true');
|
||||||
|
header('Access-Control-Allow-Methods: *');
|
||||||
|
header('Access-Control-Allow-Headers: *');
|
||||||
echo json_encode(
|
echo json_encode(
|
||||||
[
|
[
|
||||||
'success' => false,
|
'success' => false,
|
||||||
|
|||||||
Reference in new issue
Block a user