Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module Dotenv
class Railtie < Rails::Railtie
def load
Dotenv.load(
root.join("./.env"),
root.join("../.env.local"),
root.join("../.env.#{Rails.env}"),
root.join("../.env")
Expand Down
7 changes: 6 additions & 1 deletion api/config/initializers/rack_attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@

Rack::Attack.throttle throttler.ip_key, **throttler.options do |request|
next unless request.env["manifold_env.throttled_category"] == throttler.category
request.env["action_dispatch.remote_ip"]&.calculate_ip || request.ip

ENV.fetch("PROXY_CLIENT_IP_HEADER", "").split(/,\s*/).map do |header|
request.get_header(header)
end.push(request.env["action_dispatch.remote_ip"].to_s, request.ip)
.compact_blank
.first
end
end

Expand Down
4 changes: 2 additions & 2 deletions docker/local.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ API_CABLE_PORT=13120

CLIENT_URL=http://localhost:13100

CLIENT_BROWSER_API_URL=https://web.manifold.orb.local
CLIENT_BROWSER_API_URL=http://localhost:13110
CLIENT_BROWSER_API_CABLE_URL=http://localhost:13120
CLIENT_SERVER_API_URL=https://web.manifold.orb.local
CLIENT_SERVER_API_URL=http://localhost:13110

CLIENT_SERVER_PROXIES=true

Expand Down
Loading