mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 20:22:31 +02:00
Skip processing option (#590)
* Skip processing option * Simplify SkipProcessingFormats iteration
This commit is contained in:
committed by
GitHub
parent
b93aa2f144
commit
c07222b501
@@ -184,12 +184,12 @@ func handleProcessing(reqID string, rw http.ResponseWriter, r *http.Request) {
|
||||
|
||||
checkTimeout(ctx)
|
||||
|
||||
if len(conf.SkipProcessingFormats) > 0 {
|
||||
po := getProcessingOptions(ctx)
|
||||
if len(po.SkipProcessingFormats) > 0 {
|
||||
imgdata := getImageData(ctx)
|
||||
po := getProcessingOptions(ctx)
|
||||
|
||||
if imgdata.Type == po.Format || po.Format == imageTypeUnknown {
|
||||
for _, f := range conf.SkipProcessingFormats {
|
||||
for _, f := range po.SkipProcessingFormats {
|
||||
if f == imgdata.Type {
|
||||
po.Format = imgdata.Type
|
||||
respondWithImage(ctx, reqID, r, rw, imgdata.Data)
|
||||
|
Reference in New Issue
Block a user