mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 04:02:29 +02:00
Turn back token validation; Add AllowInsecure config
This commit is contained in:
@@ -408,9 +408,11 @@ func parsePath(r *http.Request) (string, processingOptions, error) {
|
||||
return "", processingOptions{}, errors.New("Invalid path")
|
||||
}
|
||||
|
||||
// if err := validatePath(parts[0], strings.TrimPrefix(path, fmt.Sprintf("/%s", parts[0]))); err != nil {
|
||||
// return "", processingOptions{}, err
|
||||
// }
|
||||
if !conf.AllowInsecure {
|
||||
if err := validatePath(parts[0], strings.TrimPrefix(path, fmt.Sprintf("/%s", parts[0]))); err != nil {
|
||||
return "", processingOptions{}, err
|
||||
}
|
||||
}
|
||||
|
||||
if _, ok := resizeTypes[parts[1]]; ok {
|
||||
return parsePathSimple(parts[1:])
|
||||
|
Reference in New Issue
Block a user