function FileSecurity::webConfigLines
Same name in this branch
- 8.9.x composer/Plugin/VendorHardening/FileSecurity.php \Drupal\Composer\Plugin\VendorHardening\FileSecurity::webConfigLines()
Same name in other branches
- 9 composer/Plugin/VendorHardening/FileSecurity.php \Drupal\Composer\Plugin\VendorHardening\FileSecurity::webConfigLines()
- 9 core/lib/Drupal/Component/FileSecurity/FileSecurity.php \Drupal\Component\FileSecurity\FileSecurity::webConfigLines()
- 10 composer/Plugin/VendorHardening/FileSecurity.php \Drupal\Composer\Plugin\VendorHardening\FileSecurity::webConfigLines()
- 10 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.
1 call to FileSecurity::webConfigLines()
- FileSecurity::writeWebConfig in core/
lib/ Drupal/ Component/ FileSecurity/ FileSecurity.php - Writes a web.config file in the given directory, if it doesn't exist.
File
-
core/
lib/ Drupal/ Component/ FileSecurity/ FileSecurity.php, line 122
Class
- FileSecurity
- Provides file security functions.
Namespace
Drupal\Component\FileSecurityCode
public static function webConfigLines() {
return <<<EOT
<configuration>
<system.webServer>
<authorization>
<deny users="*">
</authorization>
</system.webServer>
</configuration>
EOT;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.