the browser-facing portion of osu!
at master 1.3 kB view raw
1<?php 2 3use Illuminate\Http\Request; 4 5return [ 6 7 /* 8 * Set trusted proxy IP addresses. 9 * 10 * Both IPv4 and IPv6 addresses are 11 * supported, along with CIDR notation. 12 * 13 * Use "0.0.0.0/0,::/0" to trust any proxy. 14 */ 15 'proxies' => explode(',', presence(env('TRUSTED_PROXIES')) ?? ''), 16 17 /* 18 * Which headers to use to detect proxy related data (For, Host, Proto, Port) 19 * 20 * Options include: 21 * 22 * - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust) 23 * - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust) 24 * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer) 25 * 26 * - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust) 27 * - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust) 28 * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer) 29 * 30 * @link https://symfony.com/doc/current/deployment/proxies.html 31 */ 32 'headers' => Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO, 33 34];