rust-type: "String"
description: "The full 16bit RCode will be matched. If no EDNS OPT RR is present, the upper 12 bits are treated as 0"
- name: "HTTPHeader"
- description: "Matches DNS over HTTPS queries with a HTTP header name whose content matches the supplied regular expression. It is necessary to set the ``keepIncomingHeaders`` to :func:`addDOHLocal()` to use this rule"
+ description: "Matches DNS over HTTPS queries with a HTTP header name whose content matches the supplied regular expression in Perl Compatible Regular Expressions (PCRE) format. It is necessary to set the ``keepIncomingHeaders`` to :func:`addDOHLocal()` to use this rule"
parameters:
- name: "header"
type: "String"
parameters:
- name: "expression"
type: "String"
- description: "The regex to match on"
+ description: "The regex to match on, in Perl Compatible Regular Expressions (PCRE) format"
- name: "IncomingProtocol"
description: "Matches queries received over a specific protocol"
version_added: 2.1.0
parameters:
- name: "expression"
type: "String"
- description: "The regular expression to match the QNAME"
+ description: "The regular expression to match the QNAME, in Perl Compatible Regular Expressions (PCRE) format"
- name: "SNI"
description: "Matches against the TLS Server Name Indication value sent by the client, if any. Only makes sense for DoT or DoH, and for that last one matching on the HTTP Host header using :ref:`yaml-settings-HTTPHeaderSelector` might provide more consistent results"
parameters:
.. versionchanged:: 1.8.0
see ``keepIncomingHeaders`` on :func:`addDOHLocal`
- Matches DNS over HTTPS queries with a HTTP header ``name`` whose content matches the regular expression ``regex``.
+ Matches DNS over HTTPS queries with a HTTP header ``name`` whose content matches the regular expression ``regex`` in Perl Compatible Regular Expressions (PCRE) format.
Since 1.8.0 it is necessary to set the ``keepIncomingHeaders`` option to true on :func:`addDOHLocal` to be able to use this rule.
:param str name: The case-insensitive name of the HTTP header to match on
.. versionadded:: 1.4.0
- Matches DNS over HTTPS queries with a HTTP path matching the regular expression supplied in ``regex``. For example, if the query has been sent to the https://192.0.2.1:443/PowerDNS?dns=... URL, the path would be '/PowerDNS'.
+ Matches DNS over HTTPS queries with a HTTP path matching the regular expression supplied in ``regex`` in Perl Compatible Regular Expressions (PCRE) format. For example, if the query has been sent to the https://192.0.2.1:443/PowerDNS?dns=... URL, the path would be '/PowerDNS'.
Only valid DNS over HTTPS queries are matched. If you want to match all HTTP queries, see :meth:`DOHFrontend:setResponsesMap` instead.
:param str regex: The regex to match on
.. function:: RegexRule(regex)
- Matches the query name against the ``regex``.
+ Matches the query name against the ``regex`` in Perl Compatible Regular Expressions (PCRE) format.
.. code-block:: Lua