Skip to content

Commit

Permalink
enable old server request
Browse files Browse the repository at this point in the history
  • Loading branch information
afischerdev committed Sep 5, 2024
1 parent 6b4d989 commit 7b70cc5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class ServerHandler extends RequestHandler {

private RoutingContext rc;

private static boolean useOldServerFormat = System.getenv("USEOLDSERVERFORMAT") != null;

public ServerHandler(ServiceContext serviceContext, Map<String, String> params) {
super(serviceContext, params);
}
Expand Down Expand Up @@ -107,7 +109,10 @@ public String getMimeType() {
} else if ("kml".equals(format)) {
result = "application/vnd.google-earth.kml+xml";
} 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)) {
result = "text/tab-separated-values";
}
Expand Down

0 comments on commit 7b70cc5

Please sign in to comment.