src/HttpHeaders/Security/XssProtectionMiddleware.php
public function setReportUri(string $reportUri):void
    {
        if (!$this->enableProtection) {
            throw new MiddlewareException(
                $this,
                "You can't set the report URI because the XSS protection is disabled"
            );
        }
        if ($this->blockMode) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "You can't set the report URI because the block mode is already enabled (see %s)",
                    'https://developer.mozilla.org/docs/Web/HTTP/Headers/X-XSS-Protection'
                )
            );
        }
        $this->reportUri = $reportUri;
    }
public function setReportUri(string $reportUri):void
    {
        if (!$this->enableProtection) {
            throw new MiddlewareException(
                $this,
                "You can't set the report URI because the XSS protection is disabled"
            );
        }
        if ($this->blockMode) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "You can't set the report URI because the block mode is already enabled (see %s)",
                    'https://developer.mozilla.org/docs/Web/HTTP/Headers/X-XSS-Protection'
                )
            );
        }
        $this->reportUri = $reportUri;
    }
Enables the report mode and sets the report URI.

@param string $reportUri
@throws MiddlewareException