parseDomains static method
Parses a set of domains to serve static files.
Implementation
static Map<Pattern, Directory> parseDomains(Object? o,
{APIConfig? apiConfig,
Object? documentRoot,
bool checkDirectoryExistence = false}) {
o ??= apiConfig?.get('domains');
var documentRootDir = parseDomainDirectory(documentRoot,
checkDirectoryExistence: checkDirectoryExistence);
var domains =
_parseDomains(o, checkDirectoryExistence: checkDirectoryExistence);
var domains2 = {
...domains,
if (documentRootDir != null) RegExp(r'.*'): documentRootDir,
};
return domains2;
}