Skip to content

RemoteImageProvider ignores query string parameters in remote url #6

@sniffdk

Description

@sniffdk

Which version are you using?

17.0.0

Bug summary

When the remote image provider resolves the remote url for fetching an image, it uses an extension method on the Request.Path property called GetSourceUrlForRemoteImageProviderUrl.
However, this effectively strips any query parameters from the path.
I'm in a situation now where my remote images contains a signature query parameter, that is necessary for getting an image back.

So, when the image provider constructs the source url to use, it should consider both path and query.
It would make sense to add allowed query parameters to the options object.
Eg:

{
  "Prefix": "/our",
  "RemoteUrlPrefix": "https://our.umbraco.org/",
  "AllowedDomains": [ "our.umbraco.org" ],
  "AllowedQueryParameters":  [ "signature", "timestamp" ]
}

Steps to reproduce

Expected result / actual result

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions