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

Multiple Rewrite Patterns and Substitutions #399

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

tasarsu
Copy link

@tasarsu tasarsu commented Nov 27, 2022

Issue #, if available:
#121

Description of changes:
REWRITE_MATCH_PATTERN and REWRITE_SUBSTITUTION values can be written like JSON Arrays.
So multiple rewrite rules can be applied.

For example;
REWRITE_MATCH_PATTERN:
["//thumb/g","//small/g","//large/g"]

REWRITE_SUBSTITUTION:
["/300x300/filters:quality(80)","/fit-in/600x600/filters:quality(80)","/fit-in/1200x1200/filters:quality(80)"]

Checklist

  • 👋 I have run the unit tests, and all unit tests have passed.
  • ⚠️ This pull request might incur a breaking change.

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

@tasarsu tasarsu marked this pull request as ready for review November 27, 2022 15:39
@dougtoppin
Copy link
Contributor

@tasarsu thanks for your contribution, we are going to review it and try a few tests, we appreciate your work and will let you know what we find

@dougtoppin dougtoppin changed the base branch from main to feature/rewrite-pattern January 6, 2023 15:37
@dougtoppin
Copy link
Contributor

@tasarsu Thanks for your submission. We created a feature branch for it called feature/rewrite-pattern.
We may make some changes to it for adding unit tests and potentially other changes but we wanted to let you know that we are evaluating it.

@tasarsu
Copy link
Author

tasarsu commented Jan 7, 2023

Thank you for the update @dougtoppin

I have developed this feature to make it compatible with the previous thumbor version that I used in my projects. It works for me, but of course it will be much more stable with tests. Thank you for your efforts, I hope it will be a useful feature.

@dougtoppin dougtoppin merged commit 2f88c0c into aws-solutions:feature/rewrite-pattern Jan 13, 2023
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.

2 participants