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.

16 lines
521 B

package cc.bnblogs.provider.config;
import com.alibaba.csp.sentinel.adapter.servlet.callback.WebCallbackManager;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
// 这里为了测试方便,先停止授权
// 需要授权请解开下面的注释
//@Configuration
public class SentinelConfiguration {
// 配置授权规则
@PostConstruct
public void init() {
WebCallbackManager.setRequestOriginParser(new RequestOriginParserDefinition());
}
}