if(!req.body.config||typeofreq.body.config!=='object')returnnext(newHttpError(400,'config must be an object'));
if('hyphenatedSubdomains'inreq.body.config&&typeofreq.body.config.hyphenatedSubdomains!=='boolean')returnnext(newHttpError(400,'hyphenatedSubdomains must be a boolean'));
if('fallbackCertificate'inreq.body&&typeofreq.body.fallbackCertificate!=='object')returnnext(newHttpError(400,'fallbackCertificate must be a object with cert and key strings'));
if(!fallbackCertificate.cert||typeoffallbackCertificate.cert!=='string')returnnext(newHttpError(400,'fallbackCertificate.cert must be a string'));
if(!fallbackCertificate.key||typeoffallbackCertificate.key!=='string')returnnext(newHttpError(400,'fallbackCertificate.key must be a string'));
if('restricted'infallbackCertificate&&typeoffallbackCertificate.restricted!=='boolean')returnnext(newHttpError(400,'fallbackCertificate.restricted must be a boolean'));
if(!req.body.tlsConfig||typeofreq.body.tlsConfig!=='object')returnnext(newHttpError(400,'tlsConfig must be a object with a provider string property'));
if(!req.body.tlsConfig.provider||typeofreq.body.tlsConfig.provider!=='string')returnnext(newHttpError(400,'tlsConfig.provider must be a string'));
if(!req.body.config||typeofreq.body.config!=='object')returnnext(newHttpError(400,'config must be an object'));
if('hyphenatedSubdomains'inreq.body.config&&typeofreq.body.config.hyphenatedSubdomains!=='boolean')returnnext(newHttpError(400,'hyphenatedSubdomains must be a boolean'));
if('fallbackCertificate'inreq.body&&typeofreq.body.fallbackCertificate!=='object')returnnext(newHttpError(400,'fallbackCertificate must be a object with cert and key strings'));
if(!fallbackCertificate.cert||typeoffallbackCertificate.cert!=='string')returnnext(newHttpError(400,'fallbackCertificate.cert must be a string'));
if(!fallbackCertificate.key||typeoffallbackCertificate.key!=='string')returnnext(newHttpError(400,'fallbackCertificate.key must be a string'));
if('restricted'infallbackCertificate&&typeoffallbackCertificate.restricted!=='boolean')returnnext(newHttpError(400,'fallbackCertificate.restricted must be a boolean'));
if(!req.body.tlsConfig||typeofreq.body.tlsConfig!=='object')returnnext(newHttpError(400,'tlsConfig must be a object with a provider string property'));
if(!req.body.tlsConfig.provider||typeofreq.body.tlsConfig.provider!=='string')returnnext(newHttpError(400,'tlsConfig.provider must be a string'));