Skip to main content

Xsl transforming reverse proxy based on twisted

Project description

https://travis-ci.com/znerol/xslproxy.svg?branch=master

Xsl transforming reverse proxy based on twisted and lxml

Installation

python3 -m pip install xslproxy

Usage

Usage: twist [options] plugin [plugin_options] xslproxy [options]
Options:
      --backend=  Url to backend, no trailing slash [default: http://localhost]
      --help      Display this help and exit.
      --listen=   Listen port (strports syntax) [default: tcp:8080]
      --path=      [default: A directory with xsl files]
      --version   Display Twisted version and exit.

Requests to one of the proxy endpoints will be forwarded to the backend. When a successful result is returned from the backend, content is transformed using the specified XSL stylesheets and sent to the client. The following proxy endpoints are available:

/transform/{XSLPARAMS}

All stylesheets and parameters specified in XSLPARAMS are applied and to the backend response and the result is returned to the client with Content-Type header set to application/xml, text/html or text/plain according to the method specified in the <xsl:output> element of the last stylesheet in the chain.

The XSLPARAMS path segement takes the following key=value pairs. Each pair separated by the ampersand (&) character:

xsl[]

Relative path to a stylesheet on the server (without .xsl or .xslt extension). This parameter can be specified multiple times.

xa[stylesheet-key]

Stylesheet alias. Relative path to a stylesheet on the server (without .xsl or .xslt. This parameter is usefull if the same stylesheet should be applied multiple times with different parameters.

xp[stylesheet-key][param-key]

XPath parameter with the name param-key for the stylesheet specified in stylesheet-key. The latter need to match one of the values specified via xsl[] parameter.

sp[stylesheet-key][param-key]

String parameter with the name param-key for the stylesheet specified in stylesheet-key. The latter need to match one of the values specified via xsl[] parameter.

License

The software is subject to the AGPLv3 or later license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xslproxy-1.1.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

xslproxy-1.1.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file xslproxy-1.1.0.tar.gz.

File metadata

  • Download URL: xslproxy-1.1.0.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1

File hashes

Hashes for xslproxy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 53341522b5188c02dccad5de5cf74999ceefb7febf68b9c7c7f5626c848e7d14
MD5 4de1371afcc2969dbad1fab21343df2a
BLAKE2b-256 9951d05b708e5fa72fb9abe555623d6f92b42c80ae8a52f8a85210c23124f018

See more details on using hashes here.

File details

Details for the file xslproxy-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: xslproxy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1

File hashes

Hashes for xslproxy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a27640c340260a9f8fa0334999dfd1328c6996b72748fa7a0684f3b92813f360
MD5 58cb882ea28ef7f8127a733176c0fa61
BLAKE2b-256 3a09946b16284b034714efd43163d9cc10222a2e9f09cbf6820edc0fc3573afe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page