GRAYBYTE WORDPRESS FILE MANAGER1222

Server IP : 68.65.123.43 / Your IP : 216.73.216.162
System : Linux server266.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/inteuuod/public_html/wp-content/plugins/cloudflare/src/API/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/inteuuod/public_html/wp-content/plugins/cloudflare/src/API//Host.php
<?php

namespace CF\API;

class Host extends AbstractAPIClient
{
    const CF_INTEGRATION_HEADER = 'CF-Integration';
    const CF_INTEGRTATION_VERSION_HEADER = 'CF-Integration-Version';
    const HOST_API_NAME = 'HOST API';
    //self::ENDPOINT_BASE_URL . self::ENDPOINT_PATH isn't a thing so you have to update it twice if it changes.
    const ENDPOINT_BASE_URL = 'https://api.cloudflare.com/';
    const ENDPOINT_PATH = 'host-gw.html';
    const ENDPOINT = 'https://api.cloudflare.com/host-gw.html';

    /**
     * @param Request $request
     *
     * @return Request
     */
    public function beforeSend(Request $request)
    {
        //Host API isn't restful so path must always self::ENDPOINT_PATH
        $request->setUrl(self::ENDPOINT_PATH);

        $headers = array(
            self::CF_INTEGRATION_HEADER => $this->config->getValue('integrationName'),
            self::CF_INTEGRTATION_VERSION_HEADER => $this->config->getValue('version'),
        );
        $request->setHeaders($headers);

        $body = $request->getBody();
        $user_key_actions = array('zone_set', 'full_zone_set');
        if (in_array(strtolower($body['act'] ?? ""), $user_key_actions)) {
            $body['user_key'] = $this->data_store->getHostAPIUserKey();
        }
        $body['host_key'] = $this->integrationAPI->getHostAPIKey();
        $request->setBody($body);

        return $request;
    }

    /**
     * @param $host_api_response
     *
     * @return bool
     */
    public function responseOk($host_api_response)
    {
        return $host_api_response['result'] === 'success';
    }

    /**
     * @param Request $request
     *
     * @return mixed
     */
    public function getPath(Request $request)
    {
        return $request->getBody()['act'];
    }

    /**
     * @return string
     */
    public function getEndpoint()
    {
        return self::ENDPOINT;
    }

    /**
     * @return string
     */
    public function getAPIClientName()
    {
        return self::HOST_API_NAME;
    }

    /**
     * @param $message
     *
     * @return array
     */
    public function createAPIError($message)
    {
        return array(
            'request' => array(
                'act' => '',
            ),
            'result' => 'error',
            'msg' => $message,
            'err_code' => '',
        );
    }

    /**
     * @param Request $request
     *
     * @return bool
     */
    public function shouldRouteRequest(Request $request)
    {
        return $request->getUrl() === $this->getEndpoint();
    }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:45:36
inteuuod / inteuuod
0755
Exception
--
July 10 2025 04:32:23
inteuuod / inteuuod
0755
.htaccess
0.41 KB
July 10 2025 04:32:23
inteuuod / inteuuod
0644
APIInterface.php
0.219 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
AbstractAPIClient.php
5.68 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
AbstractPluginActions.php
5.375 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
Client.php
3.255 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
DefaultHttpClient.php
1.754 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
Host.php
2.494 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
HttpClientInterface.php
0.181 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
Plugin.php
2.743 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
PluginRoutes.php
1.083 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644
Request.php
1.651 KB
August 23 2024 03:21:02
inteuuod / inteuuod
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF