verify.go 700 B

12345678910111213141516171819202122
  1. package services
  2. import "hongze/hongze_open_api/utils"
  3. // AfterHandlerUrlMap 结束后待处理的url
  4. var EncryptionPathMap = map[string]int{
  5. "/api/report/getReportInfo": 1, //报告详情接口
  6. "/api/report/getReportChapterInfo": 1, //报告章节详情接口
  7. "/api/report/getReportInfo/v2": 1, //报告详情接口V2
  8. "/api/report/getReportChapterInfo/v2": 1, //报告章节详情接口V2
  9. "/api/report/getTickerData": 1, //表格数据
  10. }
  11. // CheckEncryption 校验需要是否加密
  12. func CheckEncryption(urlPath string) (isEncryption bool) {
  13. if utils.RunMode == "release" {
  14. if _, ok := EncryptionPathMap[urlPath]; ok {
  15. isEncryption = true
  16. }
  17. }
  18. return
  19. }