Ver Fonte

Deprecate basic URL format

DarthSim há 3 anos atrás
pai
commit
ce5116b9ec
2 ficheiros alterados com 5 adições e 0 exclusões
  1. 3 0
      CHANGELOG.md
  2. 2 0
      processing_options.go

+ 3 - 0
CHANGELOG.md

@@ -10,6 +10,9 @@
 ### Fix
 - (pro) Fix path prefix support in the `/info` handler.
 
+### Deprecated
+- The [basic URL format](https://docs.imgproxy.net/generating_the_url_basic) is deprecated and can be removed in future versions. Use [advanced URL format](https://docs.imgproxy.net/generating_the_url_advanced) instead.
+
 ## [2.16.7] - 2021-07-20
 ### Change
 - Reset DPI while stripping meta.

+ 2 - 0
processing_options.go

@@ -1122,6 +1122,8 @@ func parsePathPresets(parts []string, headers *processingHeaders) (string, *proc
 }
 
 func parsePathBasic(parts []string, headers *processingHeaders) (string, *processingOptions, error) {
+	logWarning("The basic URL format is deprecated and can be removed in future versions. Use advanced URL format instead")
+
 	if len(parts) < 6 {
 		return "", nil, fmt.Errorf("Invalid basic URL format arguments: %s", strings.Join(parts, "/"))
 	}