private Map<String, String> getConfigMap(String prefix) {
        Map<String, String> rval = new HashMap<>();
        Iterator<?> keys = config.getKeys(prefix);
        while (keys.hasNext()) {
            String key = String.valueOf(keys.next());
            if (key.equals(prefix)) {
                continue;
            }
            String shortKey = key.substring(prefix.length() + 1);
            String[] values = config.getStringArray(key);
            if (values.length == 0) {
                rval.put(shortKey, null);
            } else if (values.length == 1) {
                rval.put(shortKey, values[0]);
            } else {
                // Rejoin array into comma-separated to preserve compatibility.
                rval.put(shortKey, String.join(",", values));
            }
        }
        return rval;
    }
Gets all properties in the engine configuration that are prefixed
with the given prefix.
@param prefix the prefix
@return all prefixed properties
gateway/platforms/war/src/main/java/io/apiman/gateway/platforms/war/WarEngineConfig.java