You are here

public static function FileSecurity::webConfigLines in Drupal 10

Same name in this branch
  1. 10 composer/Plugin/VendorHardening/FileSecurity.php \Drupal\Composer\Plugin\VendorHardening\FileSecurity::webConfigLines()
  2. 10 core/lib/Drupal/Component/FileSecurity/FileSecurity.php \Drupal\Component\FileSecurity\FileSecurity::webConfigLines()
Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/FileSecurity/FileSecurity.php \Drupal\Component\FileSecurity\FileSecurity::webConfigLines()
  2. 9 core/lib/Drupal/Component/FileSecurity/FileSecurity.php \Drupal\Component\FileSecurity\FileSecurity::webConfigLines()

Returns the standard web.config lines for security.

Return value

string The contents of the web.config file.

File

core/lib/Drupal/Component/FileSecurity/FileSecurity.php, line 122

Class

FileSecurity
Provides file security functions.

Namespace

Drupal\Component\FileSecurity

Code

public static function webConfigLines() {
  return <<<EOT
<configuration>
  <system.webServer>
    <authorization>
      <deny users="*">
    </authorization>
  </system.webServer>
</configuration>
EOT;
}