@@ -38,22 +38,27 @@ import (
3838const HeaderAuthorizationKey = "Authorization"
3939
4040var needAuthPath = map [string ]bool {
41- "/v3/chat" : true ,
42- "/v1/conversations" : true ,
43- "/v1/conversation/create" : true ,
44- "/v1/conversation/message/list" : true ,
45- "/v1/files/upload" : true ,
46- "/v1/workflow/run" : true ,
47- "/v1/workflow/stream_run" : true ,
48- "/v1/workflow/stream_resume" : true ,
49- "/v1/workflow/get_run_history" : true ,
50- "/v1/bot/get_online_info" : true ,
51- "/v1/workflows/chat" : true ,
52- "/v1/workflow/conversation/create" : true ,
53- "/v3/chat/cancel" : true ,
54- "/v1/conversation/retrieve" : true ,
55- "/v3/chat/retrieve" : true ,
56- "/v3/chat/message/list" : true ,
41+ "/v3/chat" : true ,
42+ "/v1/conversations" : true ,
43+ "/v1/conversation/create" : true ,
44+ "/v1/conversation/message/list" : true ,
45+ "/v1/files/upload" : true ,
46+ "/v1/workflow/run" : true ,
47+ "/v1/workflow/stream_run" : true ,
48+ "/v1/workflow/stream_resume" : true ,
49+ "/v1/workflow/get_run_history" : true ,
50+ "/v1/bot/get_online_info" : true ,
51+ "/v1/workflows/chat" : true ,
52+ "/v1/workflow/conversation/create" : true ,
53+ "/v3/chat/cancel" : true ,
54+ "/v1/conversation/retrieve" : true ,
55+ "/v3/chat/retrieve" : true ,
56+ "/v3/chat/message/list" : true ,
57+ "/open_api/knowledge/document/delete" : true ,
58+ "/open_api/knowledge/document/create" : true ,
59+ "/open_api/knowledge/document/update" : true ,
60+ "/open_api/knowledge/document/list" : true ,
61+ "/v1/datasets" : true ,
5762}
5863
5964var needAuthFunc = map [string ]bool {
@@ -63,6 +68,10 @@ var needAuthFunc = map[string]bool{
6368
6469 "^/v1/workflows/[0-9]+$" : true ,
6570 "^/v1/apps/[0-9]+$" : true ,
71+
72+ "^/v1/datasets/[0-9]+$" : true , // v1/datasets/:dataset_id
73+ "^/v1/datasets/[0-9]+/images$" : true , // v1/datasets/:dataset_id/images
74+ "^/v1/datasets/[0-9]+/process$" : true , // v1/datasets/:dataset_id/process
6675}
6776
6877func parseBearerAuthToken (authHeader string ) string {
0 commit comments