From 81d97cdbc544cf1c78e417861b8e5d747ccdce01 Mon Sep 17 00:00:00 2001 From: PadowYT2 Date: Mon, 24 Jun 2024 02:19:03 +0300 Subject: [PATCH] Create HttpServer non-locally --- src/main/java/ru/padow/discordsrvoauth/DiscordSRVOAuth.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/padow/discordsrvoauth/DiscordSRVOAuth.java b/src/main/java/ru/padow/discordsrvoauth/DiscordSRVOAuth.java index 0e7e0ec..75fbdb9 100644 --- a/src/main/java/ru/padow/discordsrvoauth/DiscordSRVOAuth.java +++ b/src/main/java/ru/padow/discordsrvoauth/DiscordSRVOAuth.java @@ -197,7 +197,7 @@ public void loadConfig() { public void startServer() { try { - server = HttpServer.create(new InetSocketAddress(config.getInt("port")), 0); + server = HttpServer.create(new InetSocketAddress("0.0.0.0", config.getInt("port")), 0); server.createContext("/", exchange -> exchange.sendResponseHeaders(404, -1)); server.createContext("/" + config.getString("link_route"), new LinkHandler(config)); server.createContext("/callback", new CallbackHandler(config));