|
@@ 608-615 (lines=8) @@
|
| 605 |
|
* |
| 606 |
|
* @throws \InvalidArgumentException |
| 607 |
|
*/ |
| 608 |
|
public static function setTrustedHeaderName($key, $value) |
| 609 |
|
{ |
| 610 |
|
if (!array_key_exists($key, self::$trustedHeaders)) { |
| 611 |
|
throw new \InvalidArgumentException(sprintf('Unable to set the trusted header name for key "%s".', $key)); |
| 612 |
|
} |
| 613 |
|
|
| 614 |
|
self::$trustedHeaders[$key] = $value; |
| 615 |
|
} |
| 616 |
|
|
| 617 |
|
/** |
| 618 |
|
* Gets the trusted proxy header name. |
|
@@ 626-633 (lines=8) @@
|
| 623 |
|
* |
| 624 |
|
* @throws \InvalidArgumentException |
| 625 |
|
*/ |
| 626 |
|
public static function getTrustedHeaderName($key) |
| 627 |
|
{ |
| 628 |
|
if (!array_key_exists($key, self::$trustedHeaders)) { |
| 629 |
|
throw new \InvalidArgumentException(sprintf('Unable to get the trusted header name for key "%s".', $key)); |
| 630 |
|
} |
| 631 |
|
|
| 632 |
|
return self::$trustedHeaders[$key]; |
| 633 |
|
} |
| 634 |
|
|
| 635 |
|
/** |
| 636 |
|
* Normalizes a query string. |