Skip to content

Commit 4641414

Browse files
committed
Set content type in the non-cors support case too
1 parent 6552703 commit 4641414

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/de/komoot/photon/App.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ private static void startApi(CommandLineArgs args, Client esNodeClient) {
140140

141141
if (args.isCors()) {
142142
CorsFilter.enableCORS("*", "get", "*");
143+
} else {
144+
before((request, response) -> {
145+
response.type("application/json"); // in the other case set by enableCors
146+
});
143147
}
144148

145149
// setup search API

0 commit comments

Comments
 (0)