reverse_proxy

Classes

ReverseProxy(*args, **kwargs) Represents the remote reverse proxy.


class remoteappmanager.services.reverse_proxy.ReverseProxy(*args, **kwargs)[source]

Bases: remoteappmanager.logging.logging_mixin.LoggingMixin, traitlets.traitlets.HasTraits

Represents the remote reverse proxy. It is meant to have a high level API.

Initializes the reverse proxy connection object.

api_token = Unicode

The authorization API token to authenticate the request

a unicode string

endpoint_url = Unicode

The endpoint url at which the reverse proxy has its api

a unicode string

register(urlpath, target_host_url)[source]

Register a given urlpath to redirect to a different target host. The operation is idempotent.

Parameters:
unregister(urlpath)[source]

Unregisters a previously registered urlpath. If the urlpath is not found in the reverse proxy, it will not raise an error, but it will log the unexpected circumstance.

Parameters:urlpath (str) – The absolute path of the url (e.g. /my/internal/service/”