Skip to content

feat: allow buildUrl to use pre-encoded URLs #43

@heyitsbryanm

Description

@heyitsbryanm

Describe the feature

If the buildUrl function builds a Web Proxy URL with a pre-encoded URL, the URL will be double encoded. This returns a 400 error in the Rendering API.

To Reproduce

  1. Create a Web Proxy Source in imgix
  2. Use this Swift code (use your own secureUrlToken):
let signedClient = ImgixClient.init(
  host: "imgix-web-proxy-test-source.imgix.net",
  secureUrlToken: "EHFQXiZhxP4wA2c4"
)

// This will return a `400` error
signedClient.buildUrl("http%3A%2F%2Fassets.imgix.net%2Fexamples%2Fcat.jpg") // => https://imgix-library-secure-test-source.imgix.net/http%253A%252F%252Fassets.imgix.net%252Fexamples%252Fcat.jpg?s=5751ef13a5ca325fab9c4038b080cd80

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions