First commit!

This commit is contained in:
Dan Milne
2025-11-03 17:37:28 +11:00
commit 429d41eead
141 changed files with 5890 additions and 0 deletions

35
config/application.rb Normal file
View File

@@ -0,0 +1,35 @@
require_relative "boot"
require "rails/all"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
# Ensure pagy is loaded
require 'pagy'
module BaffleHub
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 8.1
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w[assets tasks])
# Configure trusted proxies for proper client IP detection
# This allows Rails to properly detect real client IPs behind reverse proxies
config.action_dispatch.trusted_proxies = [
# Docker network ranges where your reverse proxy might be
IPAddr.new("172.16.0.0/12"), # Docker default bridge network range
IPAddr.new("10.0.0.0/8"), # Internal networks
IPAddr.new("192.168.0.0/16"), # Private networks
IPAddr.new("172.64.66.1") # Your specific Caddy container IP
]
# Enable IP spoofing check for security
config.action_dispatch.ip_spoofing_check = true
end
end