$http_origin = $_SERVER['HTTP_ORIGIN'];
    
    if ($http_origin == "http://localhost:4200" || $http_origin == "https://reinventatelabs.com" || $http_origin == "https://salesplanet.net")
    {
        header("Access-Control-Allow-Origin: $http_origin");
        header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
        header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");
    }