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