mirror of
				https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
				synced 2025-11-01 02:46:19 +08:00 
			
		
		
		
	add response for OPTIONS request.
This commit is contained in:
		| @@ -136,6 +136,13 @@ public class APIRouter extends HttpServlet { | ||||
| 		doGet(req, resp); | ||||
| 	} | ||||
|  | ||||
| 	@Override | ||||
| 	protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||||
| 		resp.addHeader("Access-Control-Allow-Method", "POST, GET, OPTIONS"); | ||||
| 		resp.addHeader("Access-Control-Allow-Origin", "*"); | ||||
| 		resp.setStatus(HttpServletResponse.SC_NO_CONTENT); | ||||
| 	} | ||||
|  | ||||
| 	private static WxSession getSession(HttpServletRequest req) { | ||||
| 		String t = req.getParameter("token"); | ||||
| 		if (t == null || t.isEmpty()) return null; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sola
					Sola