fast-redirect redirects domains.
Project description
python3-cyberfusion-fast-redirect
fast-redirect redirects domains.
Install
PyPI
Run the following command to install the package from PyPI:
pip3 install python3-cyberfusion-fast-redirect
Debian
Run the following commands to build a Debian package:
mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc
Configure
App
Find an example config in .env.example
.
Add settings to the .env
file. This file is relative to your working directory.
Only DATABASE_PATH
is required to be set. We recommend setting it to /var/lib/fast-redirect.json
.
These settings can be overridden by specifying them as environment variables.
JSON Database
Find an example JSON database in fast-redirect.json
.
Properties:
destination_url
. URL to redirect to. This must be a URL (i.e.www.domlimev.nl
is invalid).status_code
. Allowed values:301
,302
,303
,307
,308
.keep_query_parameters
. Whether query parameters are kept. If this is false, query parameters are discarded from thedestination_url
. For example, if this is false,https://domlimev.nl/page?k=v
is redirected tohttps://example.com
.keep_path
. Whether the path is kept. If this is false, the path is discarded from thedestination_url
. For example, if this is false,https://domlimev.nl/this/is/a/path
is redirected tohttps://example.com
.
Usage
Manually
bin/fast-redirect
systemd
systemctl start fast-redirect.service
SSL
Use a proxy that terminates SSL. E.g. HAProxy.
The domain or IP address that the proxy uses for health checks should not be configured as a redirect.
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
Built Distribution
Hashes for python3_cyberfusion_fast_redirect-1.0.6.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e26958f724816dfa6a4f6627d87660c4c5e1ad8bed18a424080d2f12395c7a0 |
|
MD5 | c75499666a885ea84f49568e76574f37 |
|
BLAKE2b-256 | 7001f0ab232547a676bbac86fcc4cba10274374732cc29ce71ce066c8a73f412 |
Hashes for python3_cyberfusion_fast_redirect-1.0.6.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0cce893daf9b485a92ca87be0a9bb0b502321d0ab65a60e5dfb0637ecad1568 |
|
MD5 | 7541911a69d3a784b1caee3626c3fe6d |
|
BLAKE2b-256 | 5e621aebd8703db7ba374d1c8ab7b12edda55524d2c056fe61b00c5f1d579e07 |