Configure HTTP Header Injection for specific URL patterns
Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.
Explication
This policy enables defining a list of rules to inject custom HTTP headers into web requests matching specific URL patterns. Headers set by this policy take precedence over those that initially were present in the request, as well as modifications attempted by users or extensions.
A common use case for this policy is to enforce tenant access controls by injecting custom headers (e.g., X-Tenant-ID).
The policy accepts a list of Rules. Each Rule contains:
* patterns: A list of URL patterns to match. See how to format a URL pattern ( https://support.google.com/chrome/a?p=url_blocklist_filter_format ).
* headers: A list of objects representing headers to inject, each containing:
* name: The name of the header to inject.
* value: The value of the header to inject.
If multiple rules match a request, headers from all matching rules will be applied. In case there're multiple headers with the same name, the one with the most specific URL pattern will be applied. If patterns are equally specific, the one that appears last in the list will be applied.
Header names must be compliant with RFC 2616 ( https://www.rfc-editor.org/rfc/rfc2616 ). Header values must not contain NUL, CR or LF symbols. Individual headers must not exceed 8KB in size. Invalid headers and URL patterns will be ignored.
This policy is limited to a total of 500 URL patterns across all rules. Each rule can contain at most 20 headers. Patterns and headers beyond these thresholds will be ignored.
See https://chromeenterprise.google/policies/?policy=HttpHeaderInjection for more information about schema and formatting.
Example value:
[
{
"patterns": [
"example.com",
".example.org"
],
"headers": [
{
"name": "X-Tenant-ID",
"value": "123456"
},
{
"name": "X-Custom-Header",
"value": "CustomValue"
}
]
}
]
Registre
HKEY_LOCAL_MACHINE\Software\Policies\Google\ChromeHKEY_CURRENT_USER\Software\Policies\Google\Chrome- Nom de la valeur
- non défini dans l'ADMX
Valeurs d'activation / désactivation : non défini dans l'ADMX (voir les options ci-dessous).
PowerShell
Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.
Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.
Ordinateur (HKLM)
Activer
# Activer : chrome/HttpHeaderInjection
$k = 'HKLM:\Software\Policies\Google\Chrome'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Configure HTTP Header Injection for specific URL patterns
Set-ItemProperty -Path $k -Name 'HttpHeaderInjection' -Value '<valeur>' -Type StringDésactiver
# Désactiver : chrome/HttpHeaderInjection
# Aucune valeur n'est écrite à l'état « Désactivé » (rien de défini dans l'ADMX)Revenir à « Non configuré »
# Revenir à « Non configuré » : chrome/HttpHeaderInjection
$k = 'HKLM:\Software\Policies\Google\Chrome'
Remove-ItemProperty -Path $k -Name 'HttpHeaderInjection' -ErrorAction SilentlyContinueUtilisateur (HKCU)
Activer
Désactiver
Revenir à « Non configuré »
Options (1)
| Libellé | Contrôle | Valeur de registre | Type REG | Contraintes / détails |
|---|---|---|---|---|
| Configure HTTP Header Injection for specific URL patternsHttpHeaderInjection | Zone de textetext | HttpHeaderInjection | REG_SZ | Longueur max : 1000000 |
Application
Google Chrome (Google) — modèles de novembre 2026
Modèles officiels téléchargés le 12 novembre 2026.