proxy.py/proxy
Abhinav Singh 7195b07b24
Add support for dynamic reverse proxy routing (#1180)
* Add support for dynamic reverse proxy routing.

Plugins must implement the `handle_route(self, request, pattern) -> Url`
method from the base class to provide a choice of upstream url to serve.

This work is backward compatible a.k.a. Old style static route patterns
with hardcoded upstream urls will continue to work as-is.

See `ReverseProxyBasePlugin` documentation for more details.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Address type issues

* Fix spellcheck

* Attempt to solve type errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Py3.8 also doesnt allow subscriptable pattern type

* Remove debug print

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-11 22:44:27 +05:30
..
common Add support for dynamic reverse proxy routing (#1180) 2022-06-11 22:44:27 +05:30
core Allow multiport with ephemeral & unix socket support (#1078) 2022-01-31 01:56:34 +05:30
dashboard [Flags] `min_compression_length` consistency (#1061) 2022-01-26 14:02:47 +05:30
http Add support for dynamic reverse proxy routing (#1180) 2022-06-11 22:44:27 +05:30
plugin Add support for dynamic reverse proxy routing (#1180) 2022-06-11 22:44:27 +05:30
socks Pre `v2.4.0rc8` cleanups (#1053) 2022-01-24 11:36:51 +05:30
testing [Windows] Remove `--threadless` from `TestCase` (#1025) 2022-01-20 20:58:42 +05:30
__init__.py [isort] Lib modules (#1016) 2022-01-20 15:34:54 +05:30
__main__.py [isort] Lib modules (#1016) 2022-01-20 15:34:54 +05:30
proxy.py Register for signals only when running in main thread (#1087) 2022-02-11 00:18:40 +05:30
py.typed Add py.typed marker, add version checker, remove deprecated methods (#255) 2020-01-06 21:23:38 -08:00