Package io.quarkus.vertx.http.runtime
Interface HttpStaticDirConfig
public interface HttpStaticDirConfig
-
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Allows explicitly disabling static directory serving (e.g. for CI or DevOps use cases).endpoint()The base endpoint under which the local directory is exposed.default StringNormalizes the configured path for serving endpoint.default StringNormalizes and validates the local path from which files are served.path()The local directory from which static files will be served, relative to the application's working directory.
-
Method Details
-
enabled
@WithDefault("true") boolean enabled()Allows explicitly disabling static directory serving (e.g. for CI or DevOps use cases).Defaults to
true. Note that this property does not enable static directory serving by itself. The feature is enabled only whenquarkus.http.static-dir.pathis set. -
endpoint
The base endpoint under which the local directory is exposed.e.g.
/staticwith hello.txt will be served at/static/hello.txt. -
path
The local directory from which static files will be served, relative to the application's working directory.For example, if set to
staticand the directory containspicture.jpg, it will be available at the configuredquarkus.http.static-dir.endpoint/picture.jpg. -
normalizedPath
Normalizes and validates the local path from which files are served.- Returns:
- a normalized directory string
- Throws:
IllegalArgumentException- if the directory contains..
-
normalizedEndpoint
Normalizes the configured path for serving endpoint.- Returns:
- a normalized, safe base path for static resources
- Throws:
IllegalArgumentException- if the path contains*or..
-