trustedproxy.php 1.25 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?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' => [
        '5.9.157.179',
        '144.76.113.134',
19
        '130.75.2.6',
Dominik Hebeler's avatar
Dominik Hebeler committed
20
        '144.76.182.236',
21 22 23
    ],

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

    /*
30 31
     * Or, to trust all proxies that connect
     * directly to your server, use a "*"
32
     */
33 34 35 36 37 38 39 40 41 42 43 44 45
     # 'proxies' => '*',

    /*
     * Which headers to use to detect proxy related data (For, Host, Proto, Port)
     * 
     * Options include:
     * 
     * - 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)
     * 
     * @link https://symfony.com/doc/current/deployment/proxies.html
     */
    'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
46
];