Device Proxy. A reverse HTTP Proxy that can inspect and manipulate HTTP Headers before sending upstream.
Project description
Inspects incoming HTTP requests adds some HTTP headers and proxies upstream. Has ability to add extra cookies for HTTP responses being sent back to the client.
Installation
$ pip install device-proxy
Running
Run with twistd:
$ twistd -n devproxy --config config.yaml
Configuration
This is what the processing chain looks like:
+------------------+ | | | Header & Cookie set v | (1) HAProxy -> (2) *n* DeviceProxies | (3) | (if Cookie or Header set) +--------------------------------> (4) *n* Backend Apps
Haproxy receives incoming traffic from Nginx
Request is passed to n number of Device Proxies running. HTTP headers are inserted (possibly from cached WURFL or OpenDDR lookups). Device Proxy has the option of inserting Cookies into the HTTP response which can cache the Device Lookup (for subsequent requests HAProxy (1) could use these cookie values to skip DeviceProxy completely for the lifetime of the Cookie.) DeviceProxy reverse proxies back to HAProxy with HTTP headers inserted.
HAProxy inspects the HTTP headers & cookies received and selects appropriate backend application for the request. HAProxy can have a default fallback backend. If the Cookie is already set then the DeviceProxies are skipped.
The Backend application renders the request with a template set suitable for the given HTTP request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file device-proxy-0.4.2.tar.gz
.
File metadata
- Download URL: device-proxy-0.4.2.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f6594ce59daa9e891f46cae6c288fb81c2247d6b10774db00301ba9f2f2354a |
|
MD5 | 83b4a1f2ccd98a9ac81b8d73050b0b76 |
|
BLAKE2b-256 | ce3d85813fd2e7f1e280cca03d3618d1a5234508dae2cda3d8ece3d9d8a65328 |
File details
Details for the file device_proxy-0.4.2-py2.7.egg
.
File metadata
- Download URL: device_proxy-0.4.2-py2.7.egg
- Upload date:
- Size: 57.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b13eb31e4dc1abacb16a074cdfb0dd33929e61c46524f21aed25c0b9a8d84b64 |
|
MD5 | fd2164a6a3e810614a66dd1c3debd3fe |
|
BLAKE2b-256 | 47fe9b9937e34a9aa0acf4735ac9742114e816a22d79e7713c89d620ac894c18 |