Skip to content

Commit

Permalink
Merge pull request #319 from City-of-Helsinki/UHF-8702_410-redirect
Browse files Browse the repository at this point in the history
UHF-8702: Switched the code to 410 on unpublished job listings.
  • Loading branch information
dire authored Sep 26, 2023
2 parents 4dc46f1 + ff47aa8 commit 8bfd2ef
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public function on403(ExceptionEvent $event): void {

$url = Url::fromRoute('entity.node.canonical', ['node' => $redirectNode])->toString();

// Set temporary redirect.
$response = new TrustedRedirectResponse($url, 307);
// Set status code to 410.
$response = new TrustedRedirectResponse($url);
$response->setStatusCode(410);
$event->setResponse($response);
}

Expand Down

0 comments on commit 8bfd2ef

Please sign in to comment.