Skip to main content

WSGI AWS Unproxy

PyPI Python Tests License

Set the correct REMOTE_ADDR based on the X-Forwarded-For header, while only trusting the CloudFront IP addresses.

This module is applied as WSGI middleware, fixing the IP-address retrieval for the entire application in a secure manner. As extra benefit, external packages no longer have to write abstraction layers to retrieve the IP-address header.

Django example

In Django edit the wsgi.py file to apply the module:

from django.core.wsgi import get_wsgi_application
from wsgi_aws_unproxy import UnProxy

application = get_wsgi_application()
application = UnProxy(application)

Now all packages can just read request.META['REMOTE_ADDR'] to fetch the correct IP. This includes contact forms, Sentry error reporting and rate limiting tools.

Installation

You can install the latest version using pip:

pip install wsgi-aws-unproxy

And apply it as WSGI middleware:

from wsgi_aws_unproxy import UnProxy

application = UnProxy(application)

Releasing

Releases are managed with changie:

  1. Add a changelog entry to your pull request with changie new.

  2. After merging to master, a release pull request is opened (or updated) automatically, with the new version and the updated CHANGELOG.md.

  3. Merging the release pull request creates the GitHub release, which publishes the package to PyPI.

Metadata

Release files for wsgi-aws-unproxy 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wsgi-aws-unproxy 1.3.0
File Size Uploaded Provenance Actions
wsgi_aws_unproxy-1.3.0.tar.gz 5.6 kB With provenance Details for wsgi_aws_unproxy-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wsgi-aws-unproxy 1.3.0
File Interpreter ABI Platform Actions
wsgi_aws_unproxy-1.3.0-py3-none-any.whl Python 3 none any Details for wsgi_aws_unproxy-1.3.0-py3-none-any.whl

Total release size: 10.0 kB

Release files / wsgi_aws_unproxy-1.3.0.tar.gz

Download URL wsgi_aws_unproxy-1.3.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0c64dc4e3d828e8a6653e033db7d5667877dad322aa1d88d33e96cc2f6b6e1f7
BLAKE2b-256 checksum
How to use checksums
2fd846f95c9391a005cb3bde4639c9b20c4a6891c5c4b8bd04c7c4d06d8df143
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / wsgi_aws_unproxy-1.3.0-py3-none-any.whl

Download URL wsgi_aws_unproxy-1.3.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7e61e406dc7e665f23d8b8408443e133514912098b54741010cb854c294872e
BLAKE2b-256 checksum
How to use checksums
d8415c390f9b67f0df54f9c9862f198c2be4a64c99303815f26b03854d141ac4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for wsgi-aws-unproxy 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wsgi_aws_unproxy-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page