Cross-Origin Resource Sharing (CORS)

Cross-origin resource sharing (CORS) defines a way for websites hosted on different domains to access resources hosted on the domain where your bucket is registered.

With CORS support, you can build rich client-side web applications with Tebi and selectively allow cross-origin access.

To allow all CORS requests from all domains, enable CORS for a bucket with an empty XML configuration.

Note

Empty XML configuration is convenient for testing, but is not recommended for a production deployment.

CORS Configuration Example

 1<?xml version='1.0' encoding='UTF-8'?>
 2<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 3    <CORSRule>
 4        <AllowedOrigin>http://www.example.org</AllowedOrigin>
 5        <AllowedOrigin>https://app.example.org</AllowedOrigin>
 6        <AllowedMethod>HEAD</AllowedMethod>
 7        <AllowedMethod>GET</AllowedMethod>
 8        <AllowedMethod>POST</AllowedMethod>
 9        <AllowedHeader>*</AllowedHeader>
10    </CORSRule>
11</CORSConfiguration>

See Also

Refer here for more information.