solomax commented on a change in pull request #376: WICKET-6682 add CSP nonce 
support: DecoratingHeaderResponse approach
URL: https://github.com/apache/wicket/pull/376#discussion_r303412607
 
 

 ##########
 File path: 
wicket-core/src/main/java/org/apache/wicket/markup/head/CssHeaderItem.java
 ##########
 @@ -365,6 +382,27 @@ protected final void internalRenderCSSReference(Response 
response, String url, S
                response.write("\n");
        }
 
+       /**
+        * @return CSP nonce
+        */
+       public String getNonce()
+       {
+               return nonce;
+       }
+
+       /**
+        * Set the CSP nonce
+        *
+        * @param nonce
+        * @return {@code this} object, for method chaining
+        */
+       public CssHeaderItem setNonce(String nonce)
+       {
+               Args.notEmpty(nonce, "nonce");
 
 Review comment:
   I would say this argument can be `null`
   But it is really weird, to call this method with empty/null argument
   I would say it can raise WARN to show possible misuse ...

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to