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

Added Added ApplyDefaultCommandsToQuerylessUrls route option #83

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

msigley
Copy link

@msigley msigley commented Aug 9, 2023

No description provided.

@lilith
Copy link
Member

lilith commented Aug 9, 2023

As is, this PR can't be merged as it doesn't simply add ApplyDefaultCommandsToQuerylessUrls. It also breaks a fundamental design that allows the project to work.

99.82% of development on this and the related repos is funded by licenses rather than code contributions. Massive corporations (the kind who buy superbowl ads) systematically lie about their size in order to exploit the sliding scale system, and far more exploit the open source method of bypassing the need for a license key. Allowing them to copy and paste rather than create a repository will drastically accelerate violations of the copyleft license and reduce contributions, likely leading to the death of it given where funding levels are at.

While streamlining use by open-source developers remains a goal, I don't see a way to verify that there is a public github/gitlab/etc repository that actually belongs to them and corresponds to the project while also making it a copy/paste-20 chars process to bypass it. If you have a solution to that and want to PR it, I would welcome it.

In the near future, I'm planning to expand the defaults to allow customization by route prefix, so a more general approach might be useful for that.

@msigley
Copy link
Author

msigley commented Aug 10, 2023

I'll gladly make changes to this. My goal wasn't to bypass the license requirements, but allow the use of the AGPLv3 and the TOML config file at the same time. If you can point me to a better place in the code to hard code the SetMyOpenSourceProjectUrl that allows the use of the TOML, I'll do that instead in a branch on my fork and remove the my_open_source_project_url TOML addition.

I was a user of ImageResizer.NET as well and customized that to use the nQuant.dll library for encoding PNGs, so I do plan on making more contributions in the future probably related to tweaking the encoding settings for the different image types in the TOML.

@lilith
Copy link
Member

lilith commented Aug 10, 2023

Essentially, the design point is that for open source use, you have to compile at least Startups.cs which would contain the call to set your open source url. Does that seem reasonable?

@lilith
Copy link
Member

lilith commented Aug 10, 2023

And I absolutely do appreciate your contributions!

@msigley
Copy link
Author

msigley commented Aug 11, 2023

I have cherry picked out the open source url changes.

@msigley msigley reopened this Aug 11, 2023
@lilith
Copy link
Member

lilith commented Aug 11, 2023

Thanks. Question - will this run for all requests or just image extensions? It could slow apps down (often this is run in process in CMSes etc)

@msigley
Copy link
Author

msigley commented Aug 11, 2023

A valid image extension for requests is still validated here: https://github.com/imazen/imageflow-dotnet-server/blob/51faea988c5361fb8f9a1c99d0a3052a3ad600c5/src/Imageflow.Server/ImageJobInfo.cs#L30

It is possible for this to introduce latency or at least unexpected results if the CMS expects the full unprocessed image to be served for image requests without a valid querystring command. The latency should be offset if a cache is setup, but the cache size would obviously have to be much larger to accommodate the increased number of encoding requests. I set the default for this setting to be false for this reason.

@msigley
Copy link
Author

msigley commented Aug 11, 2023

I have found this useful in situations where folks who upload images to the server can't be relied to do so in a optimized size or format (i.e. user generated content). I previously had this feature implemented in ImageResizer.NET using IIS Rewrite rules.

@lilith lilith merged commit 9c12ab3 into imazen:main Aug 11, 2023
7 checks passed
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