|
9 | 9 |
|
10 | 10 | config.consider_all_requests_local = false |
11 | 11 |
|
12 | | -# Allow Render hostname |
13 | | - config.hosts << "prostaff.gg" |
14 | | - config.hosts << "www.prostaff.gg" |
15 | | - config.hosts << ".prostaff.gg" |
16 | | - |
17 | | - # Railway domain |
18 | | - config.hosts << "prostaff-api-production.up.railway.app" |
| 12 | + # Allow custom domains |
| 13 | + config.hosts << 'prostaff.gg' |
| 14 | + config.hosts << 'www.prostaff.gg' |
| 15 | + config.hosts << '.prostaff.gg' |
| 16 | + |
| 17 | + # Railway/Coolify domains |
| 18 | + config.hosts << 'prostaff-api-production.up.railway.app' |
| 19 | + config.hosts << 'api.prostaff.gg' |
19 | 20 |
|
20 | 21 | # Allow localhost for health checks (Coolify/Docker) |
21 | | - config.hosts << "localhost" |
22 | | - config.hosts << "127.0.0.1" |
23 | | - config.hosts << "187.77.39.215" |
24 | | - config.hosts << "api.prostaff.gg" |
| 22 | + config.hosts << 'localhost' |
| 23 | + config.hosts << '127.0.0.1' |
| 24 | + config.hosts << '187.77.39.215' |
25 | 25 |
|
26 | | - # config.hosts << "123.123.123.123" |
| 26 | + # config.hosts << '123.123.123.123' |
27 | 27 |
|
28 | 28 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? |
29 | 29 |
|
30 | 30 | config.active_storage.variant_processor = :mini_magick |
31 | 31 |
|
32 | | - # Disable force_ssl for health checks - Railway handles SSL termination |
33 | | - config.force_ssl = false |
| 32 | + # SSL is handled by reverse proxy (Coolify/Railway), but we enforce HTTPS at app level |
| 33 | + # Disabled only if explicitly set (for internal health checks) |
| 34 | + config.force_ssl = ENV.fetch('FORCE_SSL', 'true') != 'false' |
34 | 35 |
|
35 | 36 | config.log_level = :info |
36 | 37 |
|
|
43 | 44 | { |
44 | 45 | url: ENV['REDIS_URL'], |
45 | 46 | reconnect_attempts: 3, |
46 | | - error_handler: ->(method:, returning:, exception:) { |
| 47 | + error_handler: lambda { |_method:, _returning:, exception:| |
47 | 48 | Rails.logger.warn "Rails cache Redis error: #{exception.message}" |
48 | 49 | } |
49 | 50 | } |
|
0 commit comments