From b8a667b2b71d61d40593df5f889ad69825648955 Mon Sep 17 00:00:00 2001 From: Denis Tereshkin Date: Sat, 5 Jun 2021 20:18:39 +0700 Subject: [PATCH] Optional certificates in config --- src/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 0ca7682..3b03e7b 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -59,11 +59,11 @@ instance FromJSON Config where Config <$> o .: "downstream" <*> o .:? "downstream_certificate" <*> - o .: "client_certificates" <*> + o .:? "client_certificates" .!= [] <*> o .:? "whitelist" .!= [] <*> o .:? "blacklist" .!= [] <*> o .: "upstreams" <*> - o .: "upstream_client_certificate" <*> + o .:? "upstream_client_certificate" <*> o .: "timeout" parseJSON _ = fail "Expected object"