jenssegers / jenssegers/php-proxy
Urls not redirected.
- Dominant language
- PHP
- Stars
- 938
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
This example of code makes the page load correctly from the "proxy" but all the urls inside the html are the original and not the proxy.
```
filter(new RemoveEncodingFilter());
try
{
// Forward the request and get the response.
$response = $proxy->forward($request)->to('https://ouvir.radioamorportugal.com');
// Output response to the browser.
(new Laminas\HttpHandlerRunner\Emitter\SapiEmitter)->emit($response);
} catch(\GuzzleHttp\Exception\BadResponseException $e) {
// Correct way to handle bad responses
(new Laminas\HttpHandlerRunner\Emitter\SapiEmitter)->emit($e->getResponse());
}
```
Example response:
```
Webplayer - Radio amor Portugal
....
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.