|
@@ -7,6 +7,7 @@ import cn.efunbox.audio.utils.HttpUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.data.redis.core.ValueOperations;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.servlet.HandlerInterceptor;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
@@ -28,6 +29,10 @@ public class AdminInterceptor implements HandlerInterceptor {
|
|
|
@Override
|
|
|
public boolean preHandle(HttpServletRequest request,
|
|
|
HttpServletResponse response, Object handler) throws Exception {
|
|
|
+ if(request.getMethod().equalsIgnoreCase("OPTIONS")){
|
|
|
+ HttpUtil.responseOk(request, response);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
String id = request.getHeader("id");
|
|
|
String token = request.getHeader("token");
|
|
|
if(id==null)
|