trustedproxy.php 1.18 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?php

return [

    /*
     * Set trusted proxy IP addresses.
     *
     * Both IPv4 and IPv6 addresses are
     * supported, along with CIDR notation.
     *
     * The "*" character is syntactic sugar
     * within TrustedProxy to trust any proxy;
     * a requirement when you cannot know the address
     * of your proxy (e.g. if using Rackspace balancers).
     */
    'proxies' => [
Dominik Hebeler's avatar
Dominik Hebeler committed
17
        '10.244.0.0/16',
18 19 20
    ],

    /*
21 22
     * To trust one or more specific proxies that connect
     * directly to your server, use an array of IP addresses:
23
     */
24
    # 'proxies' => ['192.168.1.1'],
25 26

    /*
27 28
     * Or, to trust all proxies that connect
     * directly to your server, use a "*"
29
     */
30
    # 'proxies' => '*',
31 32 33

    /*
     * Which headers to use to detect proxy related data (For, Host, Proto, Port)
34
     *
35
     * Options include:
36
     *
37 38
     * - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust)
     * - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
39
     *
40 41 42
     * @link https://symfony.com/doc/current/deployment/proxies.html
     */
    'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
43
];