Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike on updating AWS IP ranges #5503

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrotondo
Copy link
Contributor

@mrotondo mrotondo commented Feb 3, 2025

Couple problems with the approach I've taken so far:

  1. AFAICT classes have not been been loaded when the application.rb initializer runs, so using a Service class to package up the initial IP range loading doesn't work. Not sure of a great resolution for this yet, other than possibly requiring the class explicitly in application.rb.
  2. Running Rails.application.configure in a DelayedJob seems to configure the job's (or maybe the job runner's?) application context, rather than the web server's (I'm about 85% sure this is what's happening). Thus, it isn't able to directly modify the web server's trusted_proxies configuration. The resolution for this is to call the service from a webhook action so that it runs in the web server's application context.

@mrotondo mrotondo marked this pull request as draft February 3, 2025 18:27
Copy link

github-actions bot commented Feb 3, 2025

Heroku app: https://gyr-review-app-5503-0040b9749b9f.herokuapp.com/
View logs: heroku logs --app gyr-review-app-5503 (optionally add --tail)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant