Github user thenatog commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2989#discussion_r215647422
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
 ---
    @@ -502,6 +503,11 @@ private WebAppContext loadWar(final File warFile, 
final String contextPath, fina
             // add a filter to set the X-Frame-Options filter
             webappContext.addFilter(new FilterHolder(FRAME_OPTIONS_FILTER), 
"/*", EnumSet.allOf(DispatcherType.class));
     
    +        // add a filter to set the Content Security Policy frame-ancestors 
directive
    +        FilterHolder cspFilter = new FilterHolder(new 
ContentSecurityPolicyFilter());
    --- End diff --
    
    I think I thought there was no way to set the Filter name without passing 
the FilterHolder but it looks like if you pass the classname as a string it 
will set the filter name. Setting the filter name is helpful for debugging. 
Looks like most filters being added use the FilterHolder method definition, not 
exactly sure why however.


---

Reply via email to