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:<path>": will point to an HCL file that specifies any of the 5 options above based on different import paths.
- "custom:<base64-encoded-hcl>" 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.
Declarations
Type
one of "sync", "async", "redirect", "async_redirect", "none" or string matching the pattern ^file:.*$|^custom:.*$
Default
"async_redirect"