asminog/yii2-proxy

HTTP proxy action extension for the Yii framework

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v0.1.0 2024-04-02 08:33 UTC

This package is auto-updated.

Last update: 2024-04-02 08:39:09 UTC


README

HTTP Proxy Extension for Yii 2


This is a simple proxy for Yii2 framework. This extension provides the HTTP proxy action for the Yii framework 2.0.

For license information check the LICENSE-file.

Build Status Build Status

GitHub repo file count GitHub code size in bytes

Installation

composer require asminog/yii2-proxy

Usage

use asminog\proxy\ProxyAction;

class SiteController extends Controller
{
    public function actions()
    {
        return [
            'proxy' => [
                'class' => ProxyAction::class,
                // 'accessToken' => 'your-access-token', // - set access token for secure requests
                // 'throw404Exception' => true, // - show 404 error if access token is not valid or request url is not valid
                // 'proxyHeaders' => ['User-Agent', 'Content-Type'], // - set headers for proxy request
                // 'proxyCookies' => ['cookie1', 'cookie2'], // - set cookies for proxy request
            ],
        ];
    }
}