Commit 0b7ebdb7 authored by 赵啸非's avatar 赵啸非

提交配置校验

parent 431bff63
package com.mortals.xhx.base.framework.filter;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpStatus;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
......@@ -53,7 +54,7 @@ public class SameSiteCookieFilter implements Filter {
if(trustReferers.contains(referer)) {
chain.doFilter(request, response);
}else {
httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "CSRF protection");
httpResponse.setStatus(HttpStatus.HTTP_BAD_REQUEST);
}
}
}
......
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