Interface HttpStaticDirConfig


public interface HttpStaticDirConfig
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Allows explicitly disabling static directory serving (e.g. for CI or DevOps use cases).
    The base endpoint under which the local directory is exposed.
    default String
    Normalizes the configured path for serving endpoint.
    default String
    Normalizes and validates the local path from which files are served.
    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 when quarkus.http.static-dir.path is set.

    • endpoint

      @WithDefault("static") String endpoint()
      The base endpoint under which the local directory is exposed.

      e.g. /static with hello.txt will be served at /static/hello.txt.

    • path

      Optional<String> path()
      The local directory from which static files will be served, relative to the application's working directory.

      For example, if set to static and the directory contains picture.jpg, it will be available at the configured quarkus.http.static-dir.endpoint/picture.jpg.

    • normalizedPath

      default String normalizedPath()
      Normalizes and validates the local path from which files are served.
      Returns:
      a normalized directory string
      Throws:
      IllegalArgumentException - if the directory contains ..
    • normalizedEndpoint

      default String normalizedEndpoint()
      Normalizes the configured path for serving endpoint.
      Returns:
      a normalized, safe base path for static resources
      Throws:
      IllegalArgumentException - if the path contains * or ..