mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-06-17 22:37:33 +02:00
Detect deprecated basic URL format
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Change
|
### Change
|
||||||
- Improved ICC profiles handling.
|
- Improved ICC profiles handling.
|
||||||
|
- Proper error message when the deprecated basic URL format is used.
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
- (pro) Fix parsing metadata of extended sequential JPEGs.
|
- (pro) Fix parsing metadata of extended sequential JPEGs.
|
||||||
|
@ -942,6 +942,14 @@ func defaultProcessingOptions(headers http.Header) (*ProcessingOptions, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func parsePathOptions(parts []string, headers http.Header) (*ProcessingOptions, string, error) {
|
func parsePathOptions(parts []string, headers http.Header) (*ProcessingOptions, string, error) {
|
||||||
|
if _, ok := resizeTypes[parts[0]]; ok {
|
||||||
|
return nil, "", ierrors.New(
|
||||||
|
404,
|
||||||
|
"It looks like you're using the deprecated basic URL format",
|
||||||
|
"Invalid URL",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
po, err := defaultProcessingOptions(headers)
|
po, err := defaultProcessingOptions(headers)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
|
Reference in New Issue
Block a user