public function addPluginType(string $mediaType):bool
    {
        if (!preg_match('#^[-\w]+/[-\w]+$#ui', $mediaType)) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "'%s' is not a valid media type and can not be used as a CSP plugin type",
                    $mediaType
                )
            );
        }
        if (!in_array($mediaType, $this->tags['plugin-types'])) {
            $this->tags['plugin-types'][] = $mediaType;
            return true;
        }
        return false;
    }