diff --git a/public/modules/custom/helfi_rekry_content/src/EventSubscriber/JobListingRedirectSubscriber.php b/public/modules/custom/helfi_rekry_content/src/EventSubscriber/JobListingRedirectSubscriber.php index 716cd709..618668dc 100644 --- a/public/modules/custom/helfi_rekry_content/src/EventSubscriber/JobListingRedirectSubscriber.php +++ b/public/modules/custom/helfi_rekry_content/src/EventSubscriber/JobListingRedirectSubscriber.php @@ -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); }