amphp / aerys-reverse
                                    Fund package maintenance!
                                                                            
                                                                                                                                        amphp
                                                                                    
                                                                
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 13
Watchers: 6
Forks: 4
Open Issues: 0
pkg:composer/amphp/aerys-reverse
Requires
- amphp/aerys: ^0.7
- amphp/amp: ^2
- amphp/artax: ^3
Requires (Dev)
- fabpot/php-cs-fixer: ^2.4
- phpunit/phpunit: ^6
This package is auto-updated.
Last update: 2022-07-11 20:37:22 UTC
README
amphp/aerys-reverse is a reverse HTTP proxy handler for use with the Aerys
webserver.
EXPERIMENTAL, USE AT YOUR OWN RISK!
Required PHP Version
- PHP 7.0+
Installation
composer require amphp/aerys-reverse
Usage
<?php return (new Aerys\Host) ->use(new Aerys\ReverseProxy("https://amphp.org/", ["Host" => ["amphp.org"]]);
Now all requests to the webserver are reverse proxied to https://amphp.org/, with all the headers preserved and the Host header set to amphp.org.
Alternatively one also can pass a callable as second parameter, which then gets all the headers in and should return the headers to send.
As optional third argument an Amp\Artax\Client instance can be passed (should use NullCookieJar) to setup certain options.