Skip to content

Commit

Permalink
header_rewrite: Allow for relative path to geo database files (#7727)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3159b63)
  • Loading branch information
randall authored and zwoop committed May 5, 2021
1 parent 8b0c2c8 commit 1e408bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/header_rewrite/header_rewrite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf ATS_UNUSE
}
}

if (geoDBPath.find("/") != 0) {
geoDBPath = std::string(TSConfigDirGet()) + '/' + geoDBPath;
}

std::call_once(initGeoLibs, [&geoDBPath]() { initGeoLib(geoDBPath); });

RulesConfig *conf = new RulesConfig;
Expand Down

0 comments on commit 1e408bd

Please sign in to comment.