exceptionfactory commented on a change in pull request #5887:
URL: https://github.com/apache/nifi/pull/5887#discussion_r831602716



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
##########
@@ -516,6 +519,15 @@
             )
             .build();
 
+    public static final PropertyDescriptor PROP_ENABLE_COOKIE_REDIRECTS = new 
PropertyDescriptor.Builder()
+            .name("enable-cookie-redirects")
+            .description("If true, when an HTTP server responds to a request 
with a redirect, the provided cookie will be copied to the following request.")
+            .displayName("Enable Cookie Redirects")
+            .required(true)
+            .defaultValue("false")
+            .allowableValues("true", "false")

Review comment:
       The configured cookie policy applies to all types of responses, not just 
redirects. For that reason, adjusting the property name would be helpful. 
Rather than having a `Boolean` value, it would be helpful to define this 
property as a strategy, defaulting to `Accept None`.  This would provide the 
opportunity for additional strategies down the road. A new `CookieStrategy` 
enum could be defined with values of `DISABLED` and `ACCEPT_ALL`.
   
   ```suggestion
       public static final PropertyDescriptor PROP_COOKIE_STRATEGY = new 
PropertyDescriptor.Builder()
               .name("cookie-strategy")
               .description("Strategy for accepting and persisting HTTP 
cookies. Accepting cookies enables persistence across multiple requests.")
               .displayName("Cookie Strategy")
               .required(true)
               .defaultValue(CookieStrategy.DISABLED)
               .allowableValues(CookieStrategy.values())
   ```
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to