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

    https://github.com/apache/wicket/pull/113#discussion_r27885190
  
    --- Diff: 
wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/WebSocketSettings.java
 ---
    @@ -155,6 +168,57 @@ public Executor getSendPayloadExecutor()
                return sendPayloadExecutor;
        }
     
    +    /**
    +     * Flag that controls whether hijacking protection should be turned on 
or not
    +     * 
    +     * @param protectionNeeded
    +     *            True if protection needed
    +     */
    +    public void setHijackingProtectionEnabled(boolean protectionNeeded) {
    +        this.protectionNeeded = protectionNeeded;
    +    }
    +
    +    /**
    +     * Flag that shows whether hijacking protection is turned on or not
    +     * 
    +     * @param protectionNeeded
    +     *            True if protection turned on
    +     */
    +    public boolean isHijackingProtectionEnabled() {
    +        return this.protectionNeeded;
    +    }
    +
    +    /**
    +     * The list of whitelisted domains which are allowed to initiate a 
websocket connection. This
    +     * list will be eventually used by the
    +     * {@link 
org.apache.wicket.protocol.ws.api.IWebSocketConnectionFilter} to abort 
potentially
    +     * unsafe connections. Example domain names might be:
    +     * 
    +     * <pre>
    +     *      http://www.example.com
    +     *      http://ww2.example.com
    +     * </pre>
    +     * 
    +     * @param domains
    +     *            The collection of domains
    +     */
    +    public void setAllowedDomains(Collection<String> domains) {
    +        this.allowedDomains.addAll(domains);
    --- End diff --
    
    I made a change to call clear(). See the new set of changed files.
    But I didn't know how to use iterables here, because iterables have no 
add() method.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to