You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Retrieve CORS policies configured for this bucket.
447
+
448
+
See: http://www.w3.org/TR/cors/ and
:returns: A sequence of mappings describing each CORS policy.
453
+
Keys include 'max_age', 'methods', 'origins', and
454
+
'headers'.
455
+
"""
456
+
ifnotself.has_metadata('cors'):
457
+
self.reload_metadata()
458
+
result= []
459
+
forentryinself.metadata.get('cors', ()):
460
+
entry=entry.copy()
461
+
result.append(entry)
462
+
if'maxAgeSeconds'inentry:
463
+
entry['max_age'] =entry.pop('maxAgeSeconds')
464
+
if'method'inentry:
465
+
entry['methods'] =entry.pop('method')
466
+
if'origin'inentry:
467
+
entry['origins'] =entry.pop('origin')
468
+
if'responseHeader'inentry:
469
+
entry['headers'] =entry.pop('responseHeader')
470
+
returnresult
471
+
472
+
defupdate_cors(self, entries):
473
+
"""Update CORS policies configured for this bucket.
474
+
475
+
See: http://www.w3.org/TR/cors/ and
0 commit comments