8000 adk deploy cloud_run should allow passing --allow_origins · Issue #1444 · google/adk-python · GitHub
[go: up one dir, main page]

Skip to content
adk deploy cloud_run should allow passing --allow_origins #1444
Closed
@gbmerrall

Description

@gbmerrall

Happy to submit a PR for this as it's quite a simple change.

Describe the bug
Deppoying directly to cloud run using 'adk deploy cloud_run' is very easy and simple but it does lead to some minor issues when doing development due to lalck of CORS headers. This shows up when whipping up some Javascript to talk to the agent.
It would be helpful to allow the addition of --allow-origins which could be put into the generated Dockerfile

To Reproduce
Steps to reproduce the behavior:

  1. Deploy an agent to cloud run
  2. Attempt to make a 'fetch' from inside your Javascript

Expected behavior
Data should be fetched from the agent. Instead a CORS error is produced

Desktop (please complete the following information):

  • OS: MAc/Chrome-137
  • Python version(python -V): 3.13.4
  • ADK version(pip show google-adk): 1.2.1

Additional context
The workaround is to deploy the service then to go service info in Google Cloud Console and edit the source to manually add --allow_origins to the Dockerfile then redeploy.

Two other points:

  1. An alternate fix would be to mention this in the documentation.
  2. Or in the docs simply provide the Dockerfile template as used and have the user manually add it and run 'gcloud run deploy .'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    2923
    0