You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,28 @@ Total issues:
114
114
115
115
Or something else, you can find all other `gixy` arguments with the help command: `gixy --help`
116
116
117
+
### Plugin options
118
+
119
+
Some plugins expose options which you can set via CLI flags or config file. CLI flags follow the pattern `--<PluginName>-<option>` with dashes, while config file uses `[PluginName]` sections with dashed keys.
120
+
121
+
-`origins`:
122
+
-`--origins-domains domains`: Comma-separated list of trusted registrable domains. Use `*` to disable third‑party checks. Example: `--origins-domains example.com,foo.bar`. Default: `*`.
123
+
-`--origins-https-only true|false`: When true, only the `https` scheme is considered valid for `Origin`/`Referer`. Default: `false`.
124
+
-`--origins-lower-hostname true|false`: Normalize hostnames to lowercase before validation. Default: `true`.
125
+
126
+
-`add_header_redefinition`:
127
+
-`--add-header-redefinition-headers headers`: Comma-separated allowlist of header names (case-insensitive). When set, only dropped headers from this list will be reported; when unset, all dropped headers are reported. Example: `--add-header-redefinition-headers x-frame-options,content-security-policy`. Default: unset (report all).
Copy file name to clipboardExpand all lines: docs/en/plugins/addheaderredefinition.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,3 +63,13 @@ There are several ways to solve this problem:
63
63
- use [ngx_headers_more](https://nginx-extras.getpagespeed.com/modules/headers-more/) module.
64
64
65
65
--8<-- "en/snippets/nginx-extras-cta.md"
66
+
67
+
### CLI and config options
68
+
69
+
-`--add-header-redefinition-headers headers` (Default: unset): Comma-separated, case-insensitive allowlist of headers to report when dropped. When unset, all dropped parent headers are reported. Example: `--add-header-redefinition-headers x-frame-options,content-security-policy`.
Copy file name to clipboardExpand all lines: docs/en/plugins/origins.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,19 @@ The most common errors with this configuration are:
10
10
> Notice: by default, Gixy doesn't check regexes for third-party origins matching.
11
11
> You can pass a list of trusted domains by using the option `--origins-domains example.com,foo.bar`. When enabled, Gixy recognizes origins by registrable domain (via Public Suffix List) and will flag regexes that allow off-domain values.
12
12
13
+
### CLI and config options
14
+
15
+
-`--origins-domains domains` (Default: `*`): Comma-separated list of trusted registrable domains. Use `*` to disable third‑party checks. Example: `--origins-domains example.com,foo.bar`.
16
+
-`--origins-https-only true|false` (Default: `false`): When true, only the `https` scheme is considered valid for `Origin`/`Referer`.
17
+
-`--origins-lower-hostname true|false` (Default: `true`): Normalize hostnames to lowercase before validation.
18
+
19
+
Config file example:
20
+
```
21
+
[origins]
22
+
domains = example.com, example.org
23
+
https-only = true
24
+
```
25
+
13
26
## How can I find it?
14
27
"Eazy"-breezy:
15
28
- you have to find all the `if` directives that are in charge of `$http_origin` or `$http_referer` check;
Copy file name to clipboardExpand all lines: docs/ru/plugins/addheaderredefinition.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,3 +63,13 @@ new-headers
63
63
- использовать модуль [ngx_headers_more](https://nginx-extras.getpagespeed.com/modules/headers-more/).
64
64
65
65
Каждый из способов имеет свои преимущества и недостатки, какой предпочесть зависит от ваших потребностей.
66
+
67
+
### Опции CLI и конфигурации
68
+
69
+
-`--add-header-redefinition-headers headers` (По умолчанию: не задано): Список заголовков (без учета регистра) через запятую, по которым будет вестись отчет при их «сбросе». Если опция не задана, будет отчет по всем сброшенным заголовкам. Пример: `--add-header-redefinition-headers x-frame-options,content-security-policy`.
Copy file name to clipboardExpand all lines: docs/ru/plugins/origins.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,20 @@
8
8
- разрешение не доверенных third-party доменов.
9
9
10
10
> По умолчанию Gixy не проверяет регулярные выражения на предмет матчинга third-party доменов, так как не знает кому можно верить.
11
-
Передать список доверенных доменом можно при помощи опции `--origins-domains example.com,foo.bar`
11
+
Список доверенных доменов можно передать с помощью опции `--origins-domains example.com,foo.bar`. При включении проверка выполняется на уровне регистрируемого домена (по Public Suffix List).
12
+
13
+
### Опции CLI и конфигурации
14
+
15
+
-`--origins-domains domains` (По умолчанию: `*`): Список доверенных доменов через запятую. `*` — отключить проверку third‑party доменов. Пример: `--origins-domains example.com,foo.bar`.
16
+
-`--origins-https-only true|false` (По умолчанию: `false`): Если `true`, валиден только протокол `https` в `Origin`/`Referer`.
17
+
-`--origins-lower-hostname true|false` (По умолчанию: `true`): Приводить имена хостов к нижнему регистру перед проверкой.
0 commit comments