python / psf-salt

PSF infrastructure configuration
MIT License
108 stars 57 forks source link

mod_remoteip for X-Forwarded-For handling #324

Closed cegerhardson closed 7 months ago

cegerhardson commented 7 months ago

This PR introduces a globally applied mod_remoteip configuration for handling client IPs, preparing for future rate-limiting configurations. It also specifies a salt state to manage remoteip.conf, creates a symlink to define the configuration, and another symlink to enable the configuration.

To verify these changes locally:

  1. bring up the salt-master, laptop:psf-salt user$ vagrant up salt-master
  2. bring up the loadbalancer, laptop:psf-salt user$ vagrant up loadbalancer
  3. bring up hg, laptop:psf-salt user$ vagrant up hg
  4. in another window, ssh into the vagrant hg box, laptop:psf-salt user$ vagrant ssh hg
  5. in another window, from your local computer, run the curl command curl -k https://127.0.0.1:20010/hello -H "Host: hg.python.org"
  6. in the vagrant box, run sudo tail -f /var/log/apache2/hg.access.log | grep hello