Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS #937

Closed
MKHenson opened this issue Nov 10, 2015 · 3 comments
Closed

CORS #937

MKHenson opened this issue Nov 10, 2015 · 3 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: question Request for information or clarification. Not an issue.

Comments

@MKHenson
Copy link

Hi guys

Is there a way for us to set the CORS properties of the buckets via the node API? If so, are there any examples?

Thanks

@stephenplusplus
Copy link
Contributor

You can! See bucket#setMetadata. The metadata argument accepts everything documented here.

bucket.setMetadata({
  cors: [
    {
      origin: ['http://example.appspot.com'],
      responseHeader: ['Content-Type'],
      method: ['GET', 'HEAD', 'DELETE'],
      maxAgeSeconds: 3600
    }
  ]
}, function(err) {});

Let me know if you run into any issues.

@stephenplusplus stephenplusplus added type: question Request for information or clarification. Not an issue. api: storage Issues related to the Cloud Storage API. labels Nov 11, 2015
@bedeoverend
Copy link

@daslicht don't know if you already solved this one. But on the image you're loading into the canvas, are you setting crossOrigin = 'Anonymous'? That might help. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image

@daslicht
Copy link

daslicht commented Mar 6, 2017

@bedeoverend yeah , already solved :) Thank you very much !

sofisl pushed a commit that referenced this issue Nov 11, 2022
* feat: added HUMAN_INTERVENTION_NEEDED type in ConversationEvent
feat: added SetSuggestionFeatureConfig and ClearSuggestionFeatureConfig apis
feat: added AGENT_FACING_SMART_REPLY type in KnowledgeType
feat: added GcsDestination.
docs: added explanation for uri fields in resources
docs: added explanation for SuggestionResult
docs: added explanation for language code in session

PiperOrigin-RevId: 435479473

Source-Link: googleapis/googleapis@d9ca515

Source-Link: googleapis/googleapis-gen@358c4b9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzU4YzRiOWIxZGYxNDliYzUwNjIwYmMzODExMDA0ZjkxM2Q0MzIzNiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: added explanation for SuggestionResult

PiperOrigin-RevId: 435670355

Source-Link: googleapis/googleapis@5d85995

Source-Link: googleapis/googleapis-gen@1b913e4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWI5MTNlNDQ4NGE2NmIzZjRkMDFjNTViZTE3NDcwNDI3MjQ2NjI2NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

4 participants