From 0a9139fdbe8329f9954ca60ed043d4dc79c22319 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 2 Nov 2024 14:58:56 +0100 Subject: [PATCH] [tutorial 083] A variable with custom validation --- firefox/60-dns_over_https.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firefox/60-dns_over_https.yml b/firefox/60-dns_over_https.yml index cd5be39..0c9cc15 100644 --- a/firefox/60-dns_over_https.yml +++ b/firefox/60-dns_over_https.yml @@ -23,3 +23,9 @@ dns_over_https: # DNS over HTTPS provider is not custom {% endif %} description: if "dns_over_https.provider" is not "Custom" + validators: + - jinja: | + {% if dns_over_https.custom_dns_url.startswith('http://') %} + only https is allowed + {% endif %} + description: must starts with 'https://' only