Implemented HTTPS checking for web multiplayer, fixed chat jamming all text fields

This commit is contained in:
Anuken
2018-01-21 11:54:54 -05:00
parent 40f7bf51c2
commit 2172daf145
7 changed files with 52 additions and 33 deletions

View File

@@ -25,6 +25,7 @@ public class HtmlLauncher extends GwtApplication {
static final int WIDTH = 800;
static final int HEIGHT = 600;
static HtmlLauncher instance;
boolean canJoin = true;
@Override
public PreloaderCallback getPreloaderCallback () {
@@ -111,6 +112,12 @@ public class HtmlLauncher extends GwtApplication {
public void openLink(String link){
Window.open(link, "_blank", "");
}
@Override
public boolean canJoinGame(){
String ref = Document.get().getReferrer();
return !ref.startsWith("https") && !ref.contains("itch.io");
}
};
return new Mindustry();