You are here

public function ConfigManager::saveHeadersToRemoveToConfig in Remove HTTP headers 8

Saves the HTTP headers that should be removed to the configuration.

Parameters

string[] $headersToRemove: HTTP headers that should be removed.

File

src/Config/ConfigManager.php, line 187

Class

ConfigManager
Manages module configuration.

Namespace

Drupal\remove_http_headers\Config

Code

public function saveHeadersToRemoveToConfig(array $headersToRemove) : void {
  $this
    ->getModuleConfig()
    ->set('headers_to_remove', $headersToRemove);
  $this
    ->getModuleConfig()
    ->save();
  $this
    ->invalidateHeadersToRemoveCache();
}