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
File details
Details for the file python3_cyberfusion_fast_redirect-1.0.7.tar.gz
.
File metadata
- Download URL: python3_cyberfusion_fast_redirect-1.0.7.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c6171fb11b49c3df43dd6260a376b0f2955fcc96248e8bb49cb6b3977e93128 |
|
MD5 | e5de271ba717ead39be152ac90877966 |
|
BLAKE2b-256 | 46cc18d12eb130668d6e19c3cebc66e1b4c0ed721d8476ceb0218c89073bb14c |
File details
Details for the file python3_cyberfusion_fast_redirect-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: python3_cyberfusion_fast_redirect-1.0.7-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6934e0aa9f7c06150eb92ad893506de5f487156b7af680c26ec8c67e37235b3b |
|
MD5 | ff804e125abfa88c9dd6f749c8d00f2b |
|
BLAKE2b-256 | e95e1debc839b36af7a8bc13a1223f8ac9adebea0e9261cda340140ea3885cc0 |