services.athens.downloadMode
NixOS option
Defines how Athens behaves when a module@version is not found in storage. There are 7 options: “sync”: download the module synchronously and return the results to the client. “async”: return 404, but asynchronously store the module in the storage backend. “redirect”: return a 301 redirect status to the client with the base URL as the DownloadRedirectURL from below. “async_redirect”: same as option number 3 but it will asynchronously store the module to the backend. “none”: return 404 if a module is not found and do nothing. “file:”: will point to an HCL file that specifies any of the 5 options above based on different import paths. “custom:” is the same as option 6 but the file is fully encoded in the option. This is useful for using an environment variable in serverless deployments.
type: one of "sync", "async", "redirect", "async_redirect", "none" or string matching the pattern ^file:.*$|^custom:.*$"async_redirect"