Allow robots index for podcast pages & feed (#5174)

This commit is contained in:
Vaalyn 2022-03-05 20:15:32 +01:00 committed by GitHub
parent 59e17bf428
commit d1ee9db407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 1 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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

View File

@ -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()) {