RefererConfiguration.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) Alibaba Cloud Computing
  3. * All rights reserved.
  4. *
  5. * 版权所有 (C)阿里云计算有限公司
  6. */
  7. using System.Xml.Serialization;
  8. namespace Aliyun.OSS
  9. {
  10. /// <summary>
  11. /// Referer反盗链相关配置。
  12. /// </summary>
  13. [XmlRoot("RefererConfiguration")]
  14. public class RefererConfiguration
  15. {
  16. /// <summary>
  17. /// 指定是否允许referer字段为空的请求访问。
  18. /// </summary>
  19. [XmlElement("AllowEmptyReferer")]
  20. public bool AllowEmptyReferer { get; set; }
  21. /// <summary>
  22. /// 保存referer访问白名单列表。
  23. /// </summary>
  24. [XmlElement("RefererList")]
  25. public RefererListModel RefererList { get; set; }
  26. internal RefererConfiguration()
  27. { }
  28. /// <summary>
  29. /// referer列表的配置
  30. /// </summary>
  31. [XmlRoot("RefererList")]
  32. public class RefererListModel
  33. {
  34. /// <summary>
  35. /// referer列表
  36. /// </summary>
  37. [XmlElement("Referer")]
  38. public string[] Referers { get; set; }
  39. }
  40. }
  41. }