Skip to content

Commit f1d21d3

Browse files
committed
fix: Disable Rails Host Authorization
1 parent 748ac22 commit f1d21d3

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

config/environments/production.rb

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,18 @@
99

1010
config.consider_all_requests_local = false
1111

12-
# Restrict to production domains only
13-
config.hosts << 'prostaff.gg'
14-
config.hosts << 'www.prostaff.gg'
15-
config.hosts << 'api.prostaff.gg'
16-
config.hosts << 'prostaff-api-production.up.railway.app'
17-
18-
# Allow localhost for Docker internal health checks (Coolify/Traefik)
19-
config.hosts << 'localhost'
20-
config.hosts << '127.0.0.1'
12+
# Disable Rails Host Authorization.
13+
# Traefik already filters traffic by domain (prostaff.gg), and this
14+
# prevents health checks on internal IPs (like 10.0.x.x) from being blocked.
15+
config.hosts = nil
16+
17+
# REMOVE OR COMMENT OUT THESE OLD LINES:
18+
# config.hosts << 'prostaff.gg'
19+
# config.hosts << 'www.prostaff.gg'
20+
# config.hosts << 'api.prostaff.gg'
21+
# config.hosts << 'prostaff-api-production.up.railway.app'
22+
# config.hosts << 'localhost'
23+
# config.hosts << '127.0.0.1'
2124

2225
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
2326

0 commit comments

Comments
 (0)