You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1004 B
44 lines
1004 B
package com.eco.plugin.xxxx.authcon.handler; |
|
|
|
import com.eco.plugin.wink.authcon.utils.IPWhiteUtils; |
|
import com.eco.plugin.wink.authcon.utils.ResponseUtils; |
|
import com.fr.decision.fun.impl.BaseHttpHandler; |
|
import com.fr.plugin.transform.FunctionRecorder; |
|
import com.fr.third.springframework.web.bind.annotation.RequestMethod; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
@FunctionRecorder |
|
public class IsIPWhite extends BaseHttpHandler { |
|
|
|
|
|
public IsIPWhite() { |
|
} |
|
|
|
@Override |
|
public RequestMethod getMethod() { |
|
return RequestMethod.GET; |
|
} |
|
|
|
@Override |
|
public String getPath() { |
|
return "/isIPWhite"; |
|
} |
|
|
|
@Override |
|
public boolean isPublic() { |
|
return true; |
|
} |
|
|
|
@Override |
|
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception { |
|
//获取请求参数 |
|
ResponseUtils.successResponse(res, String.valueOf(IPWhiteUtils.inWhite(req))); |
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|