@Requires(property = "elide.assets.isEnabled", notEquals = "false")
@Controller(value = "${elide.assets.prefix:/_/assets}")
class AssetController @Inject constructor(assetManager: AssetManager) : StatusEnabledController

Built-in controller implementation which bridges the configured asset serving prefix to the active AssetManager layer for this server run.

For this controller to be enabled, the configuration value elide.assets.enabled needs to be set to true. The asset prefix used by this controller is governed by the configuration value elide.assets.prefix.



Main asset manager which should be used to resolve and serve assets.


Link copied to clipboard
constructor(assetManager: AssetManager)


Link copied to clipboard
@Get(value = "/{tag}.{ext}")
suspend fun assetGet(request: HttpRequest<*>, tag: String, ext: String): FinalizedAssetResponse

Handles HTTP GET calls to asset endpoints based on "asset tag" values, which are generated at build time, and are typically composed of 8-16 characters from the tail end of the content hash for the asset.