Skip to content

Commit

Permalink
refactor: use craft\web\Response as WebResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jun 23, 2024
1 parent 554790c commit 566b52d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/Redirects.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use craft\errors\SiteNotFoundException;
use craft\helpers\Db;
use craft\helpers\StringHelper;
use craft\web\Response as WebResponse;
use DateTime;
use nystudio107\retour\events\RedirectEvent;
use nystudio107\retour\events\RedirectResolvedEvent;
Expand Down Expand Up @@ -332,7 +333,7 @@ public function doRedirect(string $fullUrl, string $pathOnly, $redirect): bool
// Sanitize the URL
$dest = UrlHelper::sanitizeUrl($dest);
// Optionally set the no-cache headers
if (Retour::$settings->setNoCacheHeaders && $response instanceof \yii\web\Response) {
if (Retour::$settings->setNoCacheHeaders && $response instanceof WebResponse) {
$response->setNoCacheHeaders();
}
// Add any additional headers (existing ones will be replaced)
Expand Down

0 comments on commit 566b52d

Please sign in to comment.