| 50 | } // namespace header_rewrite_ns |
| 51 | |
| 52 | static void |
| 53 | initHRWLibraries(const std::string &dbPath) |
| 54 | { |
| 55 | header_rewrite_ns::plugin_factory.setRuntimeDir(RecConfigReadRuntimeDir()).addSearchDir(RecConfigReadPluginDir()); |
| 56 | |
| 57 | if (dbPath.empty()) { |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | Dbg(pi_dbg_ctl, "Loading geo db %s", dbPath.c_str()); |
| 62 | |
| 63 | #if TS_USE_HRW_GEOIP |
| 64 | GeoIPConditionGeo::initLibrary(dbPath); |
| 65 | #elif TS_USE_HRW_MAXMINDDB |
| 66 | MMConditionGeo::initLibrary(dbPath); |
| 67 | #endif |
| 68 | } |
| 69 | |
| 70 | // Forward declaration for the main continuation. |
| 71 | static int cont_rewrite_headers(TSCont, TSEvent, void *); |
no test coverage detected