Commit 2e15e380 authored by 张宇迪's avatar 张宇迪

修改字段过滤

parent 9760f193
......@@ -70,10 +70,13 @@ func Proxy(c *gin.Context) {
Return(res)
return nil
}))
c.Request.URL = testutils.ParseURI(proxyData.RealUrl)
c.Request.RequestURI = proxyData.RealUrl
c.Request.Host = getHost(proxyData.RealUrl)
query := ""
if proxyData.Data_service_type1 == 2 {
query = "?f=json"
}
c.Request.URL = testutils.ParseURI(proxyData.RealUrl + query)
c.Request.RequestURI = proxyData.RealUrl + query
c.Request.Host = getHost(proxyData.RealUrl + query)
f.ServeHTTP(c.Writer, c.Request)
}
......
......@@ -9,6 +9,7 @@ type ProxyData struct {
Apply_id int `json:"apply_id" xorm:"apply_id"`
Service_id int `json:"service_id" xorm:"service_id"`
User_id string `json:"user_id" xorm:"user_id"`
Data_service_type1 int `json:"data_service_type1" xorm:"data_service_type1"`
}
type WebRes struct {
......
......@@ -386,7 +386,7 @@ func GetRealPath(applyId string) (res model.ProxyData, err error) {
}
has, err := db.
Select(`service_apply.res_fields as res_fields,service.req_url as req_url,service_request_spcs.count as count,service_safe_config.sensituve_word as sensituve_word
,service_request_spcs.sensitive_count as sensitive_count,service_apply.service_id as service_id,service_apply.id as apply_id,service_apply.user_id as user_id`).
,service_request_spcs.sensitive_count as sensitive_count,service_apply.service_id as service_id,service_apply.id as apply_id,service_apply.user_id as user_id,service.data_service_type1`).
Table(`service`).
Join(`inner`, `service_apply`, `service_apply.service_id = service.id`).
Join(`left`, `service_request_spcs`, `service_request_spcs.id = service_apply.request_spcs_id`).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment