ArunaStorage / proxy

DEPRECATED: See https://github.com/ArunaStorage/aruna/tree/main/components/data_proxy for latest release
Apache License 2.0
5 stars 0 forks source link

Feat/cors headers #58

Closed St4NNi closed 9 months ago

St4NNi commented 9 months ago

CORS handling

PR implementing all necessary parts for handling CORS requests with S3.

CORS configuration can be added in two ways:

  1. Via the PutBucketCORS S3 request (preferred)
  2. By adding a Label with a manual cors configuration:

Example:

{
  "key": "app.aruna-storage.org/cors",
  "value": [
    {
      "id": "cors",
      "allowed_headers": [
        "*"
      ],
      "allowed_methods": [
        "GET",
        "HEAD"
      ],
      "allowed_origins": [
        "https://www.example.com"
      ],
      "max_age_seconds": 86400
    }
  ]
}

Changes

Fixes

resolves #29