Class: Google::Cloud::Storage::Bucket::Cors
- Inherits:
-
Array
- Object
- Array
- Google::Cloud::Storage::Bucket::Cors
- Defined in:
- lib/google/cloud/storage/bucket/cors.rb
Overview
Bucket Cors
A special-case Array for managing the website CORS rules for a bucket. Accessed via #cors.
Defined Under Namespace
Classes: Rule
Instance Method Summary collapse
-
#add_rule(origin, methods, headers: nil, max_age: nil) ⇒ Object
Add a CORS rule to the CORS rules for a bucket.
Instance Method Details
#add_rule(origin, methods, headers: nil, max_age: nil) ⇒ Object
Add a CORS rule to the CORS rules for a bucket. Accepts options for setting preflight response headers. Preflight requests and responses are required if the request method and headers are not both simple methods and simple headers.
100 101 102 |
# File 'lib/google/cloud/storage/bucket/cors.rb', line 100 def add_rule origin, methods, headers: nil, max_age: nil push Rule.new(origin, methods, headers: headers, max_age: max_age) end |