uvicorn icon indicating copy to clipboard operation
uvicorn copied to clipboard

Add CIDR optionality to `ProxyHeadersMiddleware`

Open b-rowan opened this issue 1 year ago • 0 comments

Summary

Added the ability to pass CIDRs to ProxyHeadersMiddleware using the stdlib ipaddress library. This should fix this comment - https://github.com/encode/uvicorn/issues/1068#issuecomment-1004813267

Checklist

  • [x] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [x] I've updated the documentation accordingly.

b-rowan avatar Mar 05 '24 20:03 b-rowan