trustedproxy.php 1.23 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
        '144.76.113.134',
        '144.76.88.77',
20 21 22
    ],

    /*
Dominik Hebeler's avatar
Dominik Hebeler committed
23 24
     * To trust one or more specific proxies that connect
     * directly to your server, use an array of IP addresses:
25
     */
26
    # 'proxies' => ['192.168.1.1'],
27 28

    /*
Dominik Hebeler's avatar
Dominik Hebeler committed
29 30
     * Or, to trust all proxies that connect
     * directly to your server, use a "*"
31
     */
32
    # 'proxies' => '*',
Dominik Hebeler's avatar
Dominik Hebeler committed
33 34 35

    /*
     * Which headers to use to detect proxy related data (For, Host, Proto, Port)
36
     *
Dominik Hebeler's avatar
Dominik Hebeler committed
37
     * Options include:
38
     *
Dominik Hebeler's avatar
Dominik Hebeler committed
39 40
     * - 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)
41
     *
Dominik Hebeler's avatar
Dominik Hebeler committed
42 43 44
     * @link https://symfony.com/doc/current/deployment/proxies.html
     */
    'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
45
];