commit 4356c3e628a8de9438443ef2e7fd8b379a41ea92
parent 519c3c16d42127884f4802832c8439adc8e2feb5
Author: Joris Vink <joris@coders.se>
Date: Wed, 16 Dec 2015 19:51:06 +0100
Allow domain wildcards in the configuration.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/domain.c b/src/domain.c
@@ -16,6 +16,8 @@
#include <sys/param.h>
+#include <fnmatch.h>
+
#include "kore.h"
#define SSL_SESSION_ID "kore_ssl_sessionid"
@@ -182,7 +184,7 @@ kore_domain_lookup(const char *domain)
struct kore_domain *dom;
TAILQ_FOREACH(dom, &domains, list) {
- if (!strcmp(dom->domain, domain))
+ if (!fnmatch(dom->domain, domain, FNM_CASEFOLD))
return (dom);
}