Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 2.41 KB

File metadata and controls

34 lines (25 loc) · 2.41 KB

ConfigureCORSRequest

Request model for configuring CORS on object storage. This allows administrators to configure CORS policies on the object storage bucket to enable browser-based uploads using presigned URLs.

Properties

Name Type Description Notes
allowed_origins List[str] List of allowed origins for CORS. These are the frontend URLs that will be allowed to upload directly to object storage. REQUIRED. Must be valid HTTP/HTTPS URLs. Examples: ['http://localhost:8080', 'https://app.example.com']
allowed_methods List[str] HTTP methods to allow for CORS requests. OPTIONAL - defaults to ['GET', 'PUT', 'POST', 'HEAD', 'DELETE'] if not provided. Common methods: GET (download), PUT (upload), POST (multipart upload), HEAD (metadata check) [optional]
allowed_headers List[str] Headers that are allowed in CORS requests. OPTIONAL - defaults to [''] (allow all headers) if not provided. Use [''] for maximum compatibility or specify specific headers. [optional]
expose_headers List[str] Headers that browsers are allowed to access in responses. OPTIONAL - defaults to ['ETag', 'x-amz-request-id'] if not provided. 'ETag' is particularly important for upload confirmation. [optional]
max_age_seconds int How long (in seconds) browsers should cache preflight request results. OPTIONAL - defaults to 3000 seconds (50 minutes) if not provided. Higher values reduce preflight requests but may delay policy updates. [optional]

Example

from mixpeek.models.configure_cors_request import ConfigureCORSRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ConfigureCORSRequest from a JSON string
configure_cors_request_instance = ConfigureCORSRequest.from_json(json)
# print the JSON string representation of the object
print(ConfigureCORSRequest.to_json())

# convert the object into a dict
configure_cors_request_dict = configure_cors_request_instance.to_dict()
# create an instance of ConfigureCORSRequest from a dict
configure_cors_request_from_dict = ConfigureCORSRequest.from_dict(configure_cors_request_dict)

[Back to Model list] [Back to API list] [Back to README]