Module org.apache.wicket.core
Package org.apache.wicket.coop
Class CrossOriginOpenerPolicyConfiguration
java.lang.Object
org.apache.wicket.coop.CrossOriginOpenerPolicyConfiguration
Specifies the configuration for Cross-Origin Opener Policy to be used by
CrossOriginOpenerPolicyRequestCycleListener
when adding COOP headers. Users can specify the paths that
should be exempt from COOP and one of 4 modes
(UNSAFE_NONE, SAME_ORIGIN, SAME_ORIGIN_ALLOW_POPUPS, DISABLED
) for the policy. The
config object lives in SecuritySettings
, users can specify
their COOP preferences with the following lines in their application's
WebApplication.init()
method:
@Override protected void init() { // ... getSecuritySettings().setCrossOriginOpenerPolicyConfiguration(CoopMode.SAME_ORIGIN, "EXEMPTED PATHS"); // ... }The config value will be read once at startup in
Application.initApplication()
, changing
the configuration at runtime will have no effect of the COOP headers set.- Author:
- Santiago Diaz - saldiaz@google.com, Ecenaz Jen Ozmen - ecenazo@google.com
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCrossOriginOpenerPolicyConfiguration
(CrossOriginOpenerPolicyConfiguration.CoopMode mode, String... exemptions) -
Method Summary
-
Constructor Details
-
CrossOriginOpenerPolicyConfiguration
public CrossOriginOpenerPolicyConfiguration(CrossOriginOpenerPolicyConfiguration.CoopMode mode, String... exemptions) -
CrossOriginOpenerPolicyConfiguration
-
-
Method Details
-
addExemptedPath
-
getExemptions
-
getMode
-
getHeaderValue
-
isEnabled
-