Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving issue with secure delivery and image transformations. #187

Merged

Conversation

AlexJezior
Copy link
Contributor

Description

#186

This fix is intended for the Secure Delivery feature.

When generating a secure url with transformations, per the documentation, the slash at the beginning and end of the uuid/transformation string must be stripped out before passing it off to the AkamaiToken generator.

When the slashes remain, it yields a valid signed URL with double slashes, which is a invalid path to the Uploadcare asset, presenting a 404 error to the user. The $generator->getUrlTemplate() already appends these slashes when constructing and signing the url.

Checklist

  • Tests (if applicable)
  • Documentation (if applicable)
    • Added comment to code to explain change.
  • Changelog stub (or use conventional commit messages)

@rsedykh rsedykh self-requested a review February 7, 2022 12:55
Copy link
Member

@rsedykh rsedykh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Alex!

@rsedykh rsedykh merged commit 1602cdd into uploadcare:develop Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants