chore: commit forgotten terraform changes for allowed_callback_hosts

This commit is contained in:
41666 2021-03-13 16:02:10 -05:00
parent 3388e091c1
commit 8431df784f
5 changed files with 19 additions and 5 deletions

View file

@ -16,3 +16,5 @@ UI_PORT=6601
# Again, probably right. Do not put a trailing / # Again, probably right. Do not put a trailing /
UI_PUBLIC_URI=http://localhost:6601 UI_PUBLIC_URI=http://localhost:6601
API_PUBLIC_URI=http://localhost:6609 API_PUBLIC_URI=http://localhost:6609
ALLOWED_CALLBACK_HOSTS=http://localhost:6601,https://stage.roleypoly.com,https://next.roleypoly.com,https://roleypoly.com,https://*.roleypoly.pages.dev

View file

@ -78,4 +78,9 @@ variable "bot_tag" {
type = string type = string
default = "" default = ""
description = ":tag or @sha265: of ghcr.io/roleypoly/bot" description = ":tag or @sha265: of ghcr.io/roleypoly/bot"
} }
variable "allowed_callback_hosts" {
type = string
default = ""
}

View file

@ -15,5 +15,6 @@ ui_hostnames = [
"next.roleypoly.com", "next.roleypoly.com",
"web-prod.roleypoly.com" "web-prod.roleypoly.com"
] ]
ui_public_uri = "https://next.roleypoly.com" ui_public_uri = "https://next.roleypoly.com"
api_public_uri = "https://api-prod.roleypoly.com" api_public_uri = "https://api-prod.roleypoly.com"
allowed_callback_hosts = "https://roleypoly.com,https://next.roleypoly.com"

View file

@ -8,5 +8,6 @@ ui_hostnames = [
"stage.roleypoly.com", "stage.roleypoly.com",
"web-stage.roleypoly.com" "web-stage.roleypoly.com"
] ]
ui_public_uri = "https://stage.roleypoly.com" ui_public_uri = "https://stage.roleypoly.com"
api_public_uri = "https://api-stage.roleypoly.com" api_public_uri = "https://api-stage.roleypoly.com"
allowed_callback_hosts = "https://roleypoly.com,https://stage.roleypoly.com,https://*.roleypoly.pages.dev"

View file

@ -54,6 +54,11 @@ resource "cloudflare_worker_script" "backend" {
text = var.api_public_uri text = var.api_public_uri
} }
plain_text_binding {
name = "ALLOWED_CALLBACK_HOSTS"
text = var.allowed_callback_hosts
}
plain_text_binding { plain_text_binding {
name = "ROOT_USERS" name = "ROOT_USERS"
text = join(",", var.root_users) text = join(",", var.root_users)