Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/records/RecConfigParse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ RecConfigOverrideFromRunroot(const char *name)
if (!get_runroot().empty()) {
if (!strcmp(name, "proxy.config.bin_path") || !strcmp(name, "proxy.config.local_state_dir") ||
!strcmp(name, "proxy.config.log.logfile_dir") || !strcmp(name, "proxy.config.plugin.plugin_dir") ||
!strcmp(name, "proxy.config.hostdb.storage_path")) {
!strcmp(name, "proxy.config.hostdb.storage_path") || !strcmp(name, "proxy.config.body_factory.template_sets_dir")) {
return true;
}
}
Expand Down
8 changes: 7 additions & 1 deletion proxy/http/HttpBodyFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,13 @@ HttpBodyFactory::reconfigure()
rec_err = RecGetRecordString_Xmalloc("proxy.config.body_factory.template_sets_dir", &s);
all_found = all_found && (rec_err == REC_ERR_OKAY);
if (rec_err == REC_ERR_OKAY) {
directory_of_template_sets = Layout::get()->relative(s);
// check if we should tweak with run_root value
if (s && strlen(s) > 0) {
// the value is set via config file or ENV var
directory_of_template_sets = Layout::get()->relative(s);
} else {
directory_of_template_sets = Layout::relative_to(RecConfigReadConfigDir(), "body_factory");
}
if (access(directory_of_template_sets, R_OK) < 0) {
Warning("Unable to access() directory '%s': %d, %s", (const char *)directory_of_template_sets, errno, strerror(errno));
Warning(" Please set 'proxy.config.body_factory.template_sets_dir' ");
Expand Down