Package com.vaadin.flow.server
Class FrontendDependencyUrlResolver
java.lang.Object
com.vaadin.flow.server.FrontendDependencyUrlResolver
- All Implemented Interfaces:
Serializable
Resolves the
value() of
StyleSheet annotation values to
a canonical form that
BootstrapHandler.BootstrapUriResolver can
expand at render time. The same rules are used whether the annotation is on
an AppShellConfigurator or on an
ordinary Component.
For internal framework use only.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringresolveToContextRoot(String rawValue) Normalizes a frontend-dependency URL value to a form that the bootstrap URI resolver can expand.
-
Method Details
-
resolveToContextRoot
Normalizes a frontend-dependency URL value to a form that the bootstrap URI resolver can expand.Rules, in order:
nullor blank values returnnull.- Values containing path traversals (
..) are rejected with a warning andnullis returned. http://,https://,//,context://andbase://prefixes are returned unchanged.- A leading
./is stripped. - If the value (after the previous step) starts with
/, it is returned unchanged. - Otherwise,
context://is prepended so the value resolves against the servlet context root.
- Parameters:
rawValue- the raw annotation value- Returns:
- the normalized value, or
nullif rejected
-