enable old server request

This commit is contained in:
afischerdev 2024-09-05 11:13:22 +02:00
parent 6b4d989868
commit 7b70cc5a6f

View File

@ -40,6 +40,8 @@ public class ServerHandler extends RequestHandler {
private RoutingContext rc; private RoutingContext rc;
private static boolean useOldServerFormat = System.getenv("USEOLDSERVERFORMAT") != null;
public ServerHandler(ServiceContext serviceContext, Map<String, String> params) { public ServerHandler(ServiceContext serviceContext, Map<String, String> params) {
super(serviceContext, params); super(serviceContext, params);
} }
@ -107,7 +109,10 @@ public class ServerHandler extends RequestHandler {
} else if ("kml".equals(format)) { } else if ("kml".equals(format)) {
result = "application/vnd.google-earth.kml+xml"; result = "application/vnd.google-earth.kml+xml";
} else if ("geojson".equals(format)) { } else if ("geojson".equals(format)) {
result = "application/geo+json"; if (useOldServerFormat)
result = "application/vnd.geo+json";
else
result = "application/geo+json";
} else if ("csv".equals(format)) { } else if ("csv".equals(format)) {
result = "text/tab-separated-values"; result = "text/tab-separated-values";
} }