Proxy a URL through a Datasette instance
Project description
datasette-proxy-url
Proxy a URL through a Datasette instance
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-proxy-url
Usage
This plugin can be configured to set specific paths within Datasette to proxy content from another URL.
Configure the plugin like this:
{
"plugins": {
"datasette-proxy-url": {
"paths": [
{"path": "/proxy", "backend": "http://example.com/"},
]
}
}
}
Now any request to /proxy
will serve the HTML content from http://example.com/
.
The content-type
response header and the content body will be passed through. All other headers are currently ignored.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-proxy-url
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
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
Hashes for datasette-proxy-url-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 017ef6425282562cef4db154e8e8d0c7db1ae030fbc1b40e04884c2d29de33d0 |
|
MD5 | 9a6778e6bd2871db56c0faf0f7c016e5 |
|
BLAKE2b-256 | 3d2e6efa198f7cdab54d4ecefb49f3eac6d478d491d0027f245757282d21a177 |
Hashes for datasette_proxy_url-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cecc4091538975a25d634cb7efc47cd7125f2547d23ec85339aa2eac596ea706 |
|
MD5 | 0195810bc67109320070d6330108067f |
|
BLAKE2b-256 | 9ab0ecbf45279a5649f51bf41bc8b52463f492b4e822c36cab8097883ae21d0b |