<?php
/* error_reporting(E_ALL);
    ini_set('error_reporting', E_ALL);
    ini_set("display_errors", 1); */

error_reporting(0);
ini_set('display_errors', 'Off');
/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylorotwell@gmail.com>
 */

/*
    |--------------------------------------------------------------------------
    | Register The Auto Loader
    |--------------------------------------------------------------------------
    |
    | Composer provides a convenient, automatically generated class loader for
    | our application. We just need to utilize it! We'll simply require it
    | into the script here so that we don't have to worry about manual
    | loading any of our classes later on. It feels nice to relax.
    |
    */

require __DIR__ . '/../bootstrap/autoload.php';

/*
    |--------------------------------------------------------------------------
    | Turn On The Lights
    |--------------------------------------------------------------------------
    |
    | We need to illuminate PHP development, so let us turn on the lights.
    | This bootstraps the framework and gets it ready for use, then it
    | will load up this application so that we can run it and send
    | the responses back to the browser and delight our users.
    |
    */

$app = require_once __DIR__ . '/../bootstrap/app.php';
ini_set('post_max_size', '128M');

/*
    |--------------------------------------------------------------------------
    | Run The Application
    |--------------------------------------------------------------------------
    |
    | Once we have the application, we can handle the incoming request
    | through the kernel, and send the associated response back to
    | the client's browser allowing them to enjoy the creative
    | and wonderful application we have prepared for them.
    |
    */

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
include_once "/home/steelmin/public_html/inc/config1.php";
require_once "../pre_function/ApiQuery.php";

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

// if(strpos(request()->headers->get('referer'), "www.bigmint.co") !== false) {
//   header("Access-Control-Allow-Origin: https://www.bigmint.co");
// } elseif(strpos(request()->headers->get('referer'), "https://www.bigmint.co") !== false) {
//   header("Access-Control-Allow-Origin: https://www.bigmint.co");
// } elseif(strpos(request()->headers->get('referer'), "www.steelmint.com") !== false) {
//   header("Access-Control-Allow-Origin: https://www.steelmint.com");
// } elseif(strpos(request()->headers->get('referer'), "https://steelmint.com") !== false) {
//   header("Access-Control-Allow-Origin: https://www.steelmint.com");
// }

// header('Access-Control-Allow-Credentials: true');    
// header('Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, PATCH, DELETE');
// header('Access-Control-Allow-Headers: Origin, Content-Type, x-csrf-token,authorization, X-Requested-With');


$response->send();

$kernel->terminate($request, $response);
include_once "/home/steelmin/public_html/inc/desconfig.php";
