asminog/yii2-proxy HTTP proxy action extension for the Yii framework

HTTP Proxy Extension for Yii 2

  1. Installation
  2. Usage

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
            ],
        ];
    }
}
0 0
1 follower
10 downloads
Yii Version: Unknown
License: MIT
Category: Others
Tags: action, proxy
Developed by: asminog
Created on: Apr 2, 2024
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions