Skip to content

Commit

Permalink
fix: add region to dns for path routing (#574)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Mar 20, 2024
1 parent bd3a73f commit e10ad25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion infra/tf/dns/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ locals {
}
if server.pool_id == "gg"
],
# Lobby ID in path instead of domain
[
for server_id, server in local.servers:
{
zone_id = local.cloudflare_zone_id_job
name = "lobby.${var.domain_job}"
name = "lobby.${server.region_id}.${var.domain_job}"
server = server
proxied = false
}
Expand Down
4 changes: 2 additions & 2 deletions svc/pkg/mm/worker/src/workers/lobby_create/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,9 +891,9 @@ fn path_proxied_port(
ingress_port: None,
// TODO: Not just for hostnames anymore, change name?
ingress_hostnames: vec![format!(
"lobby.{}/{}/{}-{}",
unwrap!(util::env::domain_job()),
"lobby.{}.{}/{}-{}",
region.name_id,
unwrap!(util::env::domain_job()),
lobby_id,
port.label,
)],
Expand Down

0 comments on commit e10ad25

Please sign in to comment.