Package com.vaadin.flow.server
Enum Class CspMode
- All Implemented Interfaces:
Serializable,Comparable<CspMode>,Constable
Modes for running the application under a strict Content Security Policy,
i.e. a nonce-based
script-src policy without 'unsafe-inline'
and 'unsafe-eval'.
The mode is configured with the InitParameters.CSP configuration
parameter and read with
DeploymentConfiguration.getCspMode().
Note: so far only the setting exists. Vaadin does not yet
log or enforce anything in the WARN and STRICT modes, and
in particular sends no Content Security Policy header. All modes currently
behave like OFF.
- Since:
- 25.4
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
OFF
The default mode. The application behaves as if no strict Content Security Policy is in use. -
WARN
The application runs unchanged, but every call that would not work under a strict Content Security Policy is logged. Not implemented yet. -
STRICT
Vaadin sends a nonce-based Content Security Policy, and APIs that needevalthrow. Not implemented yet.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-