Modulairy Redirect App is a flexible Flask-based redirection application that dynamically redirects incoming HTTP requests based on environment variables prefixed with TARGET_.
Project description
Redirect App
Redirect App is a Flask application designed to redirect incoming requests based on environment variables prefixed with TARGET_
.
Installation
-
Clone the repository:
git clone https://github.com/modulairy/redirect-app.git cd redirect-app
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate
-
Install the required packages:
pip install flask
Configuration
Configure the redirection targets using environment variables prefixed with TARGET_
. Multiple targets can be specified by separating them with a semicolon (;
). For example:
export TARGET_SITE1.COM="example.com;www.example.com"
export TARGET_SITE2.COM="sub.example.com;subdomain.example.com"
Usage
-
Run the Flask application:
python app.py
-
Incoming requests will be redirected based on the configured targets.
Example
If an incoming request has a host of example.com
, it will be redirected to site1.com
.
Contributing
If you want to contribute to this project, please follow these steps:
- Fork the repository on GitHub.
- Create a new branch with your changes.
- Make your changes and commit them with descriptive messages.
- Push your changes to your fork.
- Submit a pull request to this repository.
Issues
If you encounter any issues or have questions, please open an issue on GitHub.
License
This project is licensed under the Apache 2.0 License.
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
File details
Details for the file modulairy-redirect-app-0.0.14.tar.gz
.
File metadata
- Download URL: modulairy-redirect-app-0.0.14.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb8c960db9cf46d2c36efc56a4c77cb97144a2c14f95c7f96183db3b58bde9e2 |
|
MD5 | cffd3f2f84a6457286224103d281e3e8 |
|
BLAKE2b-256 | b8cc0962232537d3734c7bc25a2e646dbee7e4ac8b92440973d6a982dd6280d5 |
File details
Details for the file modulairy_redirect_app-0.0.14-py3-none-any.whl
.
File metadata
- Download URL: modulairy_redirect_app-0.0.14-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | faab83d8f2fb9d123dbeda5aebad6a384ac76690eb6631780988ed53afa419a4 |
|
MD5 | 928a9519de703e09202d496968853130 |
|
BLAKE2b-256 | 9697ab69625216792bfd75dfdedae6fea73ea4b5b7b88fbc70a12e22b73c3a7b |