<?php

namespace App\Controllers\Api;

//use App\Controllers\BaseApiController;
use CodeIgniter\HTTP\ResponseInterface;

class PreFlight extends BaseApiController
{
    public function index()
    {
        //
    }
	 public function options()
    {
        return service('response')
            ->setHeader('Access-Control-Allow-Origin', 'http://localhost:5173')
            ->setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')
            ->setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization')
            ->setHeader('Access-Control-Allow-Credentials', 'true')
            ->setStatusCode(200);
    }
}