GitHub

Dependencies

Storage

To add storage service to your deployment, add a type of storage section to your dependencies in project.outblocks.yaml configuration file:

dependencies:
  storage:
    name: my_bucket
    type: storage
    location: eu
    versioning: true
    public: true
    expire_versions_in_days: 14
    cors:
      - methods: [GET]
        origins: ['*']

Main configuration

OptionTypeValueDescription
namestring(any string)Name of the bucket. For example, in GCP it will result with: https://storage.cloud.google.com/<your_bucket_name>/.
locationstring- en<br />- usSpecify the location for storage; refer to cloud provider docs for possible options.
publicbooleantrue/falseMakes whole storage public so that all objects can be accessed.
versioningbooleantrue/falseEnables versioning for objects.
max_versionsintegernumber (default: 10)The maximum amount of versions to keep.
delete_in_daysintegernumber (default: 10)Delete new objects after X days.
expire_versions_in_daysintegernumber (default: 10)Expire archived versions after X days.
corsarraynumber (default: 10)Expire archived versions after X days.

CORS configuration

cors key is the list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins and means "any Origin."

  • methods
OptionTypeValueDescription
methodsarray of stringsGET, OPTIONS, POST, etc.The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc.).<br/> Note: "*" is permitted in the list of methods and means "any method".
originsarray of strings(any string)The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins and means "any Origin".
response_headersarray of stringslist of HTTP headersThe list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
max_age_in_secondsintegervalues in secondsThe value in seconds to return in the Access-Control-Max-Age header used in preflight responses.

For example, to allow all origins for GET call:

cors:
  - methods: [GET]
    origins: ['*']
Previous
Database