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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54bfe8047c42e8226b10c60dc82cb91fa4472b8936d7350484678d6e1485d995 |
|
MD5 | 486b99aa8b709eb212767d57c716201c |
|
BLAKE2b-256 | a7bcc1d33248941e5a2702c15c6a60bba3890c1bed0c60019e72530e3b60eeff |
Hashes for python3_cyberfusion_fast_redirect-1.0.6.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fb3c66fe818d363f50334cb8263081c0a7f6b51ca5a32ec5a04451ad1d2cd1b |
|
MD5 | 4588dcdad88f81d4eba675e21a9066eb |
|
BLAKE2b-256 | 61d9de9e8e36a7f90f8a2bd985899c4d28091a2e99745b24ead109fcc8b3fee8 |