Skip to main content

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

  1. Clone the repository:

    git clone https://github.com/modulairy/redirect-app.git
    cd redirect-app
    
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate
    
  3. 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

  1. Run the Flask application:

    python app.py
    
  2. 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:

  1. Fork the repository on GitHub.
  2. Create a new branch with your changes.
  3. Make your changes and commit them with descriptive messages.
  4. Push your changes to your fork.
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modulairy-redirect-app-0.0.16.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

modulairy_redirect_app-0.0.16-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file modulairy-redirect-app-0.0.16.tar.gz.

File metadata

File hashes

Hashes for modulairy-redirect-app-0.0.16.tar.gz
Algorithm Hash digest
SHA256 bd826fabb88d0da0e1f16fb696c6175ca19bac2326fbef76f48d2a1f41592911
MD5 4dcb0caa4932b968665befa40270ac45
BLAKE2b-256 ef2aca886086f4db82853ca5db5c992faf22b92c291ef8e49e551342ed56f8e1

See more details on using hashes here.

File details

Details for the file modulairy_redirect_app-0.0.16-py3-none-any.whl.

File metadata

File hashes

Hashes for modulairy_redirect_app-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 017621ef6cc6810852e9cc04fa431b31b96cbbac1547aa19c3248ff03c09d6c7
MD5 c82852c7d3391e464e237bff258c5aaf
BLAKE2b-256 b88d444d92f7bd7e251e6bf2d34d217a61d83b4b1b446946968506f7e8cd7e70

See more details on using hashes here.

Supported by

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