We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe04454 commit 6481a3aCopy full SHA for 6481a3a
www/test.jsp
@@ -8,6 +8,15 @@
8
org.apache.commons.lang3.math.*"
9
%><%
10
11
+ response.setHeader("Access-Control-Allow-Origin", "*"); //"http://www.regexplanet.com");
12
+ response.setHeader("Access-Control-Allow-Methods", "POST, GET");
13
+ response.setHeader("Access-Control-Max-Age", Integer.toString(60 * 60 * 24 * 7));
14
+ if (request.getMethod().equalsIgnoreCase("options"))
15
+ {
16
+ out.print("yes, CORS is allowed!");
17
+ return;
18
+ }
19
+
20
Locale loc = request.getLocale();
21
22
JSONObject retVal = new JSONObject();
0 commit comments