mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-13 15:34:40 +01:00
Fallback to HTTP if no SSL cert
Signed-off-by: Jaida Wu <mlgmxyysd@meowcat.org>
This commit is contained in:
@@ -142,8 +142,9 @@ public final class DispatchServer {
|
||||
httpsServer.setHttpsConfigurator(new HttpsConfigurator(sslContext));
|
||||
server = httpsServer;
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("No SSL cert found!");
|
||||
return;
|
||||
Grasscutter.getLogger().error("No SSL cert found! Falling back to HTTP server.");
|
||||
Grasscutter.getConfig().UseSSL = false;
|
||||
server = HttpServer.create(getAddress(), 0);
|
||||
}
|
||||
} else {
|
||||
server = HttpServer.create(getAddress(), 0);
|
||||
|
||||
Reference in New Issue
Block a user