Combo.Static (combo v0.8.0)
View SourceManages the static files.
It is responsible for:
- generating the manifest file of static files.
- managing the cache of static files.
Configurations
:manifest- a path to a JSON manifest file. This is typically set to "priv/static/manifest.digest.json" which is the file generated bymix combo.static.digest. It can be either a string containing a file system path, or a tuple containing the application name and the path within that application. Default tonil.:vsn- whentrue, adds query string "?vsn=d" to the generated paths. This query string is used byPlug.Staticto set long expiry dates. Therefore, if you are not usingPlug.Staticto serve assets (for example, you are using a CDN), you should set this config tofalse, and you should also consider passing--no-vsntomix combo.static.digest. Defaults totrue.:compressors- the list of compressors. Default to[Combo.Static.Compressor.Gzip].:compressible_extensions- the list of compressible file extensions. Default to[".js", ".map", ".css", ".txt", ".text", ".html", ".json", ".svg", ".eot", ".ttf"].
Note
To prevent a race condition where the socket listener is already started but the static is not ready, this module should be started as a child in the supervision tree of endpoint.