B
B
BonBon Slick2017-12-10 20:58:11
PHP
BonBon Slick, 2017-12-10 20:58:11

What are proxies and what are they for?

In Symphony 4 and Laravel 5, these are the parameters that appeared. Symphony has them in Request, in Laravel they go to Middleware

class TrustProxies extends Middleware
{
    /**
     * The trusted proxies for this application.
     *
     * @var array
     */
    protected $proxies;

    /**
     * The current proxy header mappings.
     *
     * @var array
     */
    protected $headers = [
        Request::HEADER_FORWARDED => 'FORWARDED',
        Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
        Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
        Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
        Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
    ];
}

What is it and why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2017-12-10
@BonBonSlick

https://github.com/laravel/laravel/blob/master/com...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question