12345678910111213141516171819202122 |
- package services
- import "hongze/hongze_open_api/utils"
- // AfterHandlerUrlMap 结束后待处理的url
- var EncryptionPathMap = map[string]int{
- "/api/report/getReportInfo": 1, //报告详情接口
- "/api/report/getReportChapterInfo": 1, //报告章节详情接口
- "/api/report/getReportInfo/v2": 1, //报告详情接口V2
- "/api/report/getReportChapterInfo/v2": 1, //报告章节详情接口V2
- "/api/report/getTickerData": 1, //表格数据
- }
- // CheckEncryption 校验需要是否加密
- func CheckEncryption(urlPath string) (isEncryption bool) {
- if utils.RunMode == "release" {
- if _, ok := EncryptionPathMap[urlPath]; ok {
- isEncryption = true
- }
- }
- return
- }
|