Commit 149244ab authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Always set `Access-Control-Allow-Origin *` header.

Fixes #22062.
parent 06ab8b46
# Changes in version 7.0-1.??.? - 2019-1?-??
* Minor changes
- Set `Access-Control-Allow-Origin *` response header for bad
requests, too.
# Changes in version 7.0-1.21.0 - 2019-10-18
......
......@@ -96,6 +96,8 @@ public class ResourceServlet extends HttpServlet {
HttpServletResponseWrapper response, long receivedRequestMillis)
throws IOException {
response.setHeader("Access-Control-Allow-Origin", "*");
if (this.maintenanceMode) {
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
return;
......@@ -408,7 +410,6 @@ public class ResourceServlet extends HttpServlet {
((CACHE_MAX_TIME - indexAgeMillis)
/ CACHE_INTERVAL) * CACHE_INTERVAL);
response.setHeader("Access-Control-Allow-Origin", "*");
response.setContentType("application/json");
response.setCharacterEncoding("utf-8");
response.setHeader("Cache-Control", "public, max-age="
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment