• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / Yoast-SEO-for-TYPO3 / 21521134747

30 Jan 2026 03:30PM UTC coverage: 0.866% (-0.4%) from 1.275%
21521134747

push

github

RinyVT
[FEATURE] Version 12.0.0, added v14 support, removed v11 support including php8.0 and php8.1, rewrote backend javascript functionality to typescript and webcomponents

0 of 550 new or added lines in 53 files covered. (0.0%)

33 existing lines in 21 files now uncovered.

23 of 2657 relevant lines covered (0.87%)

0.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Classes/EventListener/FrontendRequestListener.php
1
<?php
2

3
/**
4
 * This file is part of the "yoast_seo" extension for TYPO3 CMS.
5
 *
6
 * For the full copyright and license information, please read the
7
 * LICENSE.txt file that was distributed with this source code.
8
 */
9

10
declare(strict_types=1);
11

12
namespace YoastSeoForTypo3\YoastSeo\EventListener;
13

14
use MaxServ\FrontendRequest\Event\ModifyRequestEvent;
15
use Psr\Http\Message\RequestInterface;
16
use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
17
use YoastSeoForTypo3\YoastSeo\Service\Hmac\HmacGeneratorServiceInterface;
18

19
#[Autoconfigure(public: true)]
20
class FrontendRequestListener
21
{
22
    public function __construct(
23
        protected HmacGeneratorServiceInterface $hmacService
NEW
24
    ) {}
×
25

26
    public function __invoke(ModifyRequestEvent $event): void
27
    {
NEW
28
        $request = $this->addBasicAuthenticationHeader($event->getRequest());
×
NEW
29
        $event->setRequest(
×
NEW
30
            $request->withHeader('X-Yoast-Page-Request', $this->hmacService->generate(
×
NEW
31
                $event->getContext()->getUrl()
×
NEW
32
            ))
×
NEW
33
        );
×
34
    }
35

36
    protected function addBasicAuthenticationHeader(RequestInterface $request): RequestInterface
37
    {
NEW
38
        if (!isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['previewSettings']['basicAuth'])) {
×
NEW
39
            return $request;
×
40
        }
41

NEW
42
        $basicAuth = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['yoast_seo']['previewSettings']['basicAuth'];
×
NEW
43
        if (!is_array($basicAuth) || empty($basicAuth['username'] ?? '') || empty($basicAuth['password'] ?? '')) {
×
NEW
44
            return $request;
×
45
        }
46

NEW
47
        return $request->withHeader(
×
NEW
48
            'Authorization',
×
NEW
49
            'Basic ' . base64_encode(
×
NEW
50
                $basicAuth['username'] . ':' . $basicAuth['password']
×
NEW
51
            )
×
NEW
52
        );
×
53
    }
54
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc