@@ -12,6 +12,11 @@ public class ImageflowMiddlewareOptions
12
12
public ImageflowMiddlewareOptions ( )
13
13
{
14
14
}
15
+
16
+ internal string LicenseKey { get ; set ; }
17
+ internal EnforceLicenseWith EnforcementMethod { get ; set ; }
18
+
19
+ public string MyOpenSourceProjectUrl { get ; set ; }
15
20
16
21
public bool AllowMemoryCaching { get ; set ; } = false ;
17
22
@@ -80,6 +85,36 @@ public ImageflowMiddlewareOptions HandleExtensionlessRequestsUnder(string prefix
80
85
ExtensionlessPaths . Add ( new ExtensionlessPath ( ) { Prefix = prefix , PrefixComparison = prefixComparison } ) ;
81
86
return this ;
82
87
}
88
+
89
+ /// <summary>
90
+ /// Use this if you are complying with the AGPL v3 and open-sourcing your project.
91
+ /// Provide the URL to your version control system or source code download page.
92
+ /// Use .SetLicenseKey() instead if you are not open-sourcing your project.
93
+ /// </summary>
94
+ /// <param name="myOpenSourceProjectUrl">Provide the URL to your version control
95
+ /// system or source code download page.</param>
96
+ /// <returns></returns>
97
+ public ImageflowMiddlewareOptions SetMyOpenSourceProjectUrl ( string myOpenSourceProjectUrl )
98
+ {
99
+ MyOpenSourceProjectUrl = myOpenSourceProjectUrl ;
100
+ return this ;
101
+ }
102
+
103
+ /// <summary>
104
+ /// If you do not call this, Imageflow.Server will watermark image requests with a red dot.
105
+ ///
106
+ /// If you are open-sourcing your project and complying with the AGPL v3, you can call
107
+ /// .SetMyOpenSourceProjectUrl() instead.
108
+ /// </summary>
109
+ /// <param name="licenseKey"></param>
110
+ /// <param name="enforcementMethod"></param>
111
+ /// <returns></returns>
112
+ public ImageflowMiddlewareOptions SetLicenseKey ( EnforceLicenseWith enforcementMethod , string licenseKey )
113
+ {
114
+ EnforcementMethod = enforcementMethod ;
115
+ LicenseKey = licenseKey ;
116
+ return this ;
117
+ }
83
118
84
119
public ImageflowMiddlewareOptions SetRequestSignatureOptions ( RequestSignatureOptions options )
85
120
{
0 commit comments