Skip to content

Commit

Permalink
Merge pull request fermyon#1978 from vdice/chore/tinygo-outbound-allowed
Browse files Browse the repository at this point in the history
chore(examples/tinygo-outbound-*): add allowed_outbound_hosts config
  • Loading branch information
vdice authored Nov 1, 2023
2 parents ee5b781 + 5384409 commit 1447c08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/tinygo-outbound-mysql/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ component = "tinygo-mysql"
[component.tinygo-mysql]
environment = { DB_URL = "mysql://spin:spin@127.0.0.1/spin_dev" }
source = "main.wasm"
allowed_outbound_hosts = ["mysql://127.0.0.1"]
[component.tinygo-mysql.build]
command = "tinygo build -target=wasi -gc=leaking -o main.wasm main.go"
watch = ["**/*.go", "go.mod"]
1 change: 1 addition & 0 deletions examples/tinygo-outbound-pg/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ component = "tinygo-outbound-pg-example"
[component.tinygo-outbound-pg-example]
environment = { DB_URL = "host=localhost user=postgres dbname=spin_dev" }
source = "main.wasm"
allowed_outbound_hosts = ["postgres://localhost"]
[component.tinygo-outbound-pg-example.build]
command = "tinygo build -target=wasi -gc=leaking -o main.wasm main.go"
watch = ["**/*.go", "go.mod"]
1 change: 1 addition & 0 deletions examples/tinygo-outbound-redis/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ component = "outbound-redis"
[component.outbound-redis]
source = "main.wasm"
environment = { REDIS_ADDRESS = "redis://127.0.0.1:6379", REDIS_CHANNEL = "messages" }
allowed_outbound_hosts = ["redis://127.0.0.1"]
[component.outbound-redis.build]
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"

0 comments on commit 1447c08

Please sign in to comment.