Allow robots index for podcast pages & feed (#5174)
This commit is contained in:
parent
59e17bf428
commit
d1ee9db407
|
@ -28,6 +28,8 @@ class PodcastEpisodeController
|
|||
string $podcast_id,
|
||||
string $episode_id
|
||||
): ResponseInterface {
|
||||
$response = $response->withHeader('X-Robots-Tag', 'index, nofollow');
|
||||
|
||||
$router = $request->getRouter();
|
||||
$station = $request->getStation();
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ class PodcastEpisodesController
|
|||
Response $response,
|
||||
string $podcast_id
|
||||
): ResponseInterface {
|
||||
$response = $response->withHeader('X-Robots-Tag', 'index, nofollow');
|
||||
|
||||
$router = $request->getRouter();
|
||||
$station = $request->getStation();
|
||||
|
||||
|
|
|
@ -77,7 +77,9 @@ class PodcastFeedController
|
|||
|
||||
$response->getBody()->write($generatedRss);
|
||||
|
||||
return $response->withHeader('Content-Type', 'application/rss+xml');
|
||||
return $response
|
||||
->withHeader('Content-Type', 'application/rss+xml')
|
||||
->withHeader('X-Robots-Tag', 'index, nofollow');
|
||||
}
|
||||
|
||||
protected function checkHasPublishedEpisodes(Podcast $podcast): bool
|
||||
|
|
|
@ -19,6 +19,8 @@ class PodcastsController
|
|||
|
||||
public function __invoke(ServerRequest $request, Response $response): ResponseInterface
|
||||
{
|
||||
$response = $response->withHeader('X-Robots-Tag', 'index, nofollow');
|
||||
|
||||
$station = $request->getStation();
|
||||
|
||||
if (!$station->getEnablePublicPage()) {
|
||||
|
|
Loading…
Reference in New Issue