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

Add options to createPresignedRequest method #2849

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clauculo
Copy link

@clauculo clauculo commented Dec 5, 2023

*Issue: None

Description of changes:
This tiny change will make it possible to sign pre-signed-requests with optional parameters, this can be used to make use of this part of the code:

$startTimestamp = isset($options['start_time'])
? $this->convertToTimestamp($options['start_time'], null)
: time();

This wil make it possible to sign the S3 links with a timestamp in the past!
This is very handy if you want to make use of short caching.
Without the options, every signed url will have an unique signature, because time() function is used.

Found here:
https://github.com/clauculo/aws-sdk-php/blob/725492580ef8a49108e39803dc266c25faa30d5a/src/Signature/SignatureV4.php#L171

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant