text
stringlengths 0
2.2M
|
---|
}
|
}
|
}
|
}
|
else if(eles.at(apps).getTagName()=="handoffs")
|
{
|
ElementList cntrls = eles.at(apps).getChildElements();
|
for (unsigned int cntn = 0; cntn < cntrls.size(); cntn++)
|
{
|
if(cntrls.at(cntn).getTagName()=="handoff")
|
{
|
std::string app = cntrls.at(cntn).getAttribute("app");
|
std::string def = cntrls.at(cntn).getAttribute("default");
|
std::string ext = cntrls.at(cntn).getAttribute("ext");
|
ConfigurationData::getInstance()->handoffs[app] = def;
|
ConfigurationData::getInstance()->handoffs[app+"extension"] = ext;
|
handoffVec.push_back("-l"+ app+" ");
|
logger << ("Adding Handoff for app => " + app + " , ext => " + ext + " , default url => " + def) << std::endl;
|
}
|
}
|
}
|
else if(eles.at(apps).getTagName()=="cors-config")
|
{
|
ElementList cntrls = eles.at(apps).getChildElements();
|
std::string allwdOrigins, allwdMethods, allwdHeaders, exposedHeaders;
|
bool allwdCredentials;
|
long maxAge;
|
for (unsigned int cntn = 0; cntn < cntrls.size(); cntn++)
|
{
|
if(cntrls.at(cntn).getTagName()=="allow-origins")
|
{
|
allwdOrigins = cntrls.at(cntn).getText();
|
}
|
else if(cntrls.at(cntn).getTagName()=="allow-methods")
|
{
|
allwdMethods = cntrls.at(cntn).getText();
|
}
|
else if(cntrls.at(cntn).getTagName()=="allow-headers")
|
{
|
allwdHeaders = cntrls.at(cntn).getText();
|
}
|
else if(cntrls.at(cntn).getTagName()=="allow-credentials")
|
{
|
try {
|
allwdCredentials = CastUtil::toBool(cntrls.at(cntn).getText());
|
} catch(const std::exception& e) {}
|
}
|
else if(cntrls.at(cntn).getTagName()=="expose-headers")
|
{
|
exposedHeaders = cntrls.at(cntn).getText();
|
}
|
else if(cntrls.at(cntn).getTagName()=="max-age")
|
{
|
try {
|
maxAge = CastUtil::toLong(cntrls.at(cntn).getText());
|
} catch(const std::exception& e) {}
|
}
|
}
|
ConfigurationData::getInstance()->corsConfig = CorsConfig(allwdOrigins, allwdMethods, allwdHeaders,
|
exposedHeaders, allwdCredentials, maxAge);
|
logger << ("CORS Configuartion allow-origins => " + ConfigurationData::getInstance()->corsConfig.allwdOrigins
|
+ " , allow-methods => " + ConfigurationData::getInstance()->corsConfig.allwdMethods
|
+ " , allow-headers => " + ConfigurationData::getInstance()->corsConfig.allwdHeaders
|
+ " , allow-credentials => " + CastUtil::fromBool(ConfigurationData::getInstance()->corsConfig.allwdCredentials)
|
+ " , expose-headers => " + ConfigurationData::getInstance()->corsConfig.exposedHeaders
|
+ " , max-age => " + CastUtil::fromNumber(ConfigurationData::getInstance()->corsConfig.maxAge)) << std::endl;
|
}
|
#ifdef INC_JOBS
|
else if(eles.at(apps).getTagName()=="job-procs")
|
{
|
ElementList cntrls = eles.at(apps).getChildElements();
|
JobScheduler::init(cntrls, name);
|
}
|
#endif
|
}
|
}
|
logger << "done reading application.xml " << std::endl;
|
#ifdef BUILD_AUTOCONF
|
libs += ("-l"+ flibname+" ");
|
#else
|
libs += ("${HAVE_"+StringUtil::toUpperCopy(applibname)+"} ");
|
ilibs += ("FIND_LIBRARY(HAVE_"+StringUtil::toUpperCopy(applibname)+" "+flibname+" HINTS \"${CMAKE_SOURCE_DIR}/../lib\")\n");
|
ilibs += ("if(NOT HAVE_"+StringUtil::toUpperCopy(applibname)+")\n");
|
ilibs += ("\tmessage(FATAL_ERROR \""+name+" lib not found\")\n");
|
ilibs += ("endif()\n");
|
#endif
|
configureDataSources(name, defpath+"config/sdorm.xml", allclsmap);
|
configureCaches(name, defpath+"config/cache.xml");
|
logger << "started reading fviews.xml " << std::endl;
|
Document doc1;
|
parser.readDocument(defpath+"config/fviews.xml", doc1);
|
const Element& root1 = doc1.getRootElement();
|
if(root1.getTagName()=="fview" && root1.getChildElements().size()>0)
|
{
|
ElementList eles = root1.getChildElements();
|
for (unsigned int apps = 0; apps < eles.size(); apps++)
|
{
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.