Skip to main content

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 the destination_url. For example, if this is false, https://domlimev.nl/page?k=v is redirected to https://example.com.
  • keep_path. Whether the path is kept. If this is false, the path is discarded from the destination_url. For example, if this is false, https://domlimev.nl/this/is/a/path is redirected to https://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

python3_cyberfusion_fast_redirect-1.0.8.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file python3_cyberfusion_fast_redirect-1.0.8.tar.gz.

File metadata

File hashes

Hashes for python3_cyberfusion_fast_redirect-1.0.8.tar.gz
Algorithm Hash digest
SHA256 561697d667ce899a7e72b3774a8c8758ac597cb54624408331926c7e1c04f212
MD5 6cdc16f989ee8e1730c8115fc5ad780c
BLAKE2b-256 ad41f40d2d4870f064779c78eea154877044eb704a890e74beab9c3721ea5594

See more details on using hashes here.

File details

Details for the file python3_cyberfusion_fast_redirect-1.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for python3_cyberfusion_fast_redirect-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6600d24c3d53a3a33a52d3579e03976c6a8ee37d8749292a90a073508a451bf2
MD5 3baccee32c563e71181c618724652c75
BLAKE2b-256 ea21f7f7ce25b53e5192570a9e643721d7aadab8f8e8a6f6874fbf274ff108bf

See more details on using hashes here.

Supported by

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