function ReverseProxyMiddlewareTest::testReverseProxyEnabled
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\ReverseProxyMiddlewareTest::testReverseProxyEnabled()
- 10 core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\ReverseProxyMiddlewareTest::testReverseProxyEnabled()
- 11.x core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php \Drupal\Tests\Core\StackMiddleware\ReverseProxyMiddlewareTest::testReverseProxyEnabled()
Tests that subscriber sets trusted headers when reverse proxy is set.
@dataProvider reverseProxyEnabledProvider
File
-
core/
tests/ Drupal/ Tests/ Core/ StackMiddleware/ ReverseProxyMiddlewareTest.php, line 55
Class
- ReverseProxyMiddlewareTest
- Unit test the reverse proxy stack middleware.
Namespace
Drupal\Tests\Core\StackMiddlewareCode
public function testReverseProxyEnabled($provided_settings, $expected_trusted_header_set) {
// Enable reverse proxy and add test values.
$settings = new Settings([
'reverse_proxy' => 1,
] + $provided_settings);
$this->trustedHeadersAreSet($settings, $expected_trusted_header_set);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.