Do not use 'https' for local request mappings.
This commit is contained in:
Kris De Volder
2019-03-25 12:09:30 -07:00
parent fcb97ab13e
commit 47935c96bf
2 changed files with 8 additions and 3 deletions

View File

@@ -36,8 +36,6 @@ public class LiveAppURLSymbolProvider {
}
public List<? extends SymbolInformation> getSymbols(String query) {
System.out.println(query);
List<SymbolInformation> result = new ArrayList<>();
try {

View File

@@ -12,8 +12,15 @@ package org.springframework.ide.vscode.boot.java.requestmapping;
import org.springframework.ide.vscode.commons.util.StringUtil;
import com.google.common.collect.ImmutableSet;
public class UrlUtil {
private static final ImmutableSet<String> LOCALHOST_ALIASES = ImmutableSet.of(
"localhost",
"127.0.0.1"
);
/**
* Creates http URL string based on host, port and path
* @param host
@@ -40,7 +47,7 @@ public class UrlUtil {
if (port.equals("80")) {
return "http://"+host+path;
} else {
if ("localhost".equals(host)) {
if (LOCALHOST_ALIASES.contains(host)) {
return "http://" + host + ":" + port + path;
} else {
return "https://" + host + ":" + port + path;