diff --git a/src/main/java/io/github/danthe1st/httpsintercept/config/Config.java b/src/main/java/io/github/danthe1st/httpsintercept/config/Config.java index e422c4d..e5c9ca5 100644 --- a/src/main/java/io/github/danthe1st/httpsintercept/config/Config.java +++ b/src/main/java/io/github/danthe1st/httpsintercept/config/Config.java @@ -35,6 +35,9 @@ private List emptyIfNull(List preForwardRules) { } public static Config load(Path path) throws IOException { + if(!Files.exists(path)) { + return new Config(null, null, null); + } ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); try(Reader reader = Files.newBufferedReader(path)){ return mapper.readValue(reader, Config.class);