feat: add option to allow worker HTTP image requests

This commit is contained in:
creamlike1024 committed 2025-05-09 02:00:42 +08:00
1 parent 4d0b438f81
commit 285c4a7e4c
4 files changed
+28 -5

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ func DoWorkerRequest(req *WorkerRequest) (*http.Response, error) {
if !setting.EnableWorker() {
return nil, fmt.Errorf("worker not enabled")
}
if !strings.HasPrefix(req.URL, "https") {
if !setting.WorkerAllowHttpImageRequestEnabled && !strings.HasPrefix(req.URL, "https") {
return nil, fmt.Errorf("only support https url")
}