XssProperties.java 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package com.ruoyi.gateway.config.properties;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import org.springframework.boot.context.properties.ConfigurationProperties;
  5. import org.springframework.cloud.context.config.annotation.RefreshScope;
  6. import org.springframework.context.annotation.Configuration;
  7. /**
  8. * XSS跨站脚本配置
  9. *
  10. * @author ruoyi
  11. */
  12. @Configuration
  13. @RefreshScope
  14. @ConfigurationProperties(prefix = "security.xss")
  15. public class XssProperties
  16. {
  17. /**
  18. * Xss开关
  19. */
  20. private Boolean enabled;
  21. /**
  22. * 排除路径
  23. */
  24. private List<String> excludeUrls = new ArrayList<>();
  25. public Boolean getEnabled()
  26. {
  27. return enabled;
  28. }
  29. public void setEnabled(Boolean enabled)
  30. {
  31. this.enabled = enabled;
  32. }
  33. public List<String> getExcludeUrls()
  34. {
  35. return excludeUrls;
  36. }
  37. public void setExcludeUrls(List<String> excludeUrls)
  38. {
  39. this.excludeUrls = excludeUrls;
  40. }
  41. }