Skip to content

Commit

Permalink
docs: improve .htaccess warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaucau committed Nov 19, 2024
1 parent b4c8be8 commit dfbc2a4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Utility/HtaccessManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ class HtaccessManager

private string $htaccessPath;
private Filesystem $filesystem;
private CookieFactory $cookie;
private SettingsRepositoryInterface $settings;

public function __construct(Paths $paths, CookieFactory $cookie, SettingsRepositoryInterface $settings)
{
public function __construct(
Paths $paths,
private readonly CookieFactory $cookie,
private readonly SettingsRepositoryInterface $settings,
) {
$this->filesystem = new Filesystem();
$this->htaccessPath = $paths->public.'/.htaccess';

$this->cookie = $cookie;
$this->settings = $settings;
}

/**
Expand All @@ -50,7 +48,7 @@ public function updateHtaccess(): void
/** Generates the content of the LSCache block to be inserted into the .htaccess file. */
private function generateLsCacheBlock(): string
{
$block = self::BEGIN_LSCACHE." - Do not edit the contents of this block!\n";
$block = self::BEGIN_LSCACHE." - Generated by LSCache extension. Do not manually edit the contents of this block!\n";
$block .= '<IfModule LiteSpeed>'.
$this->addLine('CacheLookup on').
$this->addLine('RewriteEngine On').
Expand Down

0 comments on commit dfbc2a4

Please sign in to comment.