Package org.apache.wicket.coep
Class CrossOriginEmbedderPolicyConfiguration
- java.lang.Object
-
- org.apache.wicket.coep.CrossOriginEmbedderPolicyConfiguration
-
public class CrossOriginEmbedderPolicyConfiguration extends Object
Specifies the configuration for Cross-Origin Embedder Policy to be used forCrossOriginEmbedderPolicyRequestCycleListener
. Users can specify the paths that should be exempt from COEP and one of 3 modes (REPORTING, ENFORCING, DISABLED
) for the policy. The config object lives inSecuritySettings
, users can specify their COOP preferences with the following lines in their application'sWebApplication.init()
method:@Override protected void init() { // ... getSecuritySettings().setCrossOriginEmbedderPolicyConfiguration(CoepMode.REPORTING, "EXEMPTED PATHS"); // ... }
The config value will be read once at startup inApplication.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:
CrossOriginEmbedderPolicyRequestCycleListener
,SecuritySettings
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CrossOriginEmbedderPolicyConfiguration.CoepMode
-
Constructor Summary
Constructors Constructor Description CrossOriginEmbedderPolicyConfiguration(CrossOriginEmbedderPolicyConfiguration.CoepMode mode)
CrossOriginEmbedderPolicyConfiguration(CrossOriginEmbedderPolicyConfiguration.CoepMode mode, String... exemptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CrossOriginEmbedderPolicyConfiguration
addExemptedPath(String path)
String
getCoepHeader()
Set<String>
getExemptions()
CrossOriginEmbedderPolicyConfiguration.CoepMode
getMode()
boolean
isEnabled()
-
-
-
Constructor Detail
-
CrossOriginEmbedderPolicyConfiguration
public CrossOriginEmbedderPolicyConfiguration(CrossOriginEmbedderPolicyConfiguration.CoepMode mode, String... exemptions)
-
CrossOriginEmbedderPolicyConfiguration
public CrossOriginEmbedderPolicyConfiguration(CrossOriginEmbedderPolicyConfiguration.CoepMode mode)
-
-
Method Detail
-
getExemptions
public Set<String> getExemptions()
-
getMode
public CrossOriginEmbedderPolicyConfiguration.CoepMode getMode()
-
getCoepHeader
public String getCoepHeader()
-
addExemptedPath
public CrossOriginEmbedderPolicyConfiguration addExemptedPath(String path)
-
isEnabled
public boolean isEnabled()
-
-