{"id":31640433,"url":"https://github.com/mokira3d48/redic_serv","last_synced_at":"2025-10-07T02:41:23.965Z","repository":{"id":315012748,"uuid":"1057721197","full_name":"mokira3d48/REDIC_SERV","owner":"mokira3d48","description":"Python script that creates a Flask web server using Gunicorn to redirect all requests to a URL provided as a command-line argument.","archived":false,"fork":false,"pushed_at":"2025-09-16T06:49:21.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-16T08:13:30.153Z","etag":null,"topics":["flask-application","gunicorn-web-server","http-redirect","http-server","python-server"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mokira3d48.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-16T05:57:17.000Z","updated_at":"2025-09-16T06:48:25.000Z","dependencies_parsed_at":"2025-09-16T08:13:42.241Z","dependency_job_id":"d41a3212-2ba0-4c35-942f-025c33c06785","html_url":"https://github.com/mokira3d48/REDIC_SERV","commit_stats":null,"previous_names":["mokira3d48/redict_serv"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mokira3d48/REDIC_SERV","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokira3d48%2FREDIC_SERV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokira3d48%2FREDIC_SERV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokira3d48%2FREDIC_SERV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokira3d48%2FREDIC_SERV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mokira3d48","download_url":"https://codeload.github.com/mokira3d48/REDIC_SERV/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokira3d48%2FREDIC_SERV/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278710230,"owners_count":26032404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask-application","gunicorn-web-server","http-redirect","http-server","python-server"],"created_at":"2025-10-07T02:41:18.407Z","updated_at":"2025-10-07T02:41:23.956Z","avatar_url":"https://github.com/mokira3d48.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# REDIC_SERV\n\n![](https://img.shields.io/badge/Python-3.10-blue)\n![](https://img.shields.io/badge/LICENSE-Apache--2.0-%2300557f)\n![](https://img.shields.io/badge/lastest-2025--09--16-green)\n![](https://img.shields.io/badge/contact-dr.mokira%40gmail.com-blueviolet)\n\n\n\u003c/div\u003e\n\nPython script that creates a Flask web server using Gunicorn\nto redirect all requests to a URL provided as a command-line argument.\n\nTo use this script:\n\n1. **Install required dependencies**:\n```bash\npip install flask gunicorn\n```\n\n2. **Run with Flask development server** (for testing):\n```bash\npython redicserv.py \"https://google.com\"\n```\n\nor\n\n```bash\n./redicserv.py \"https://google.com\"\n```\n\n3. **Run with Gunicorn** (for production):\n```bash\ngunicorn redicserv:app -b 0.0.0.0:8000\n```\n\nWhen using Gunicorn, set the redirect URL via environment variable:\n```bash\nexport REDIRECT_URL=\"https://google.com\"\ngunicorn redicserv:app -b 0.0.0.0:8000\n```\n\n## Key Features:\n\n- **Command-line argument support** - Accepts URL as command-line argument.\n- **Environment variable fallback** - Supports `REDIRECT_URL` environment\nvariable for Gunicorn compatibility.\n- **Wildcard routing** - Catches all paths and redirects to target URL.\n- **URL validation** - Automatically adds `https://` prefix if missing.\n- **Production-ready** - Works with Gunicorn WSGI server.\n\n## Advanced Configuration:\n\nFor production use, create a Gunicorn configuration file `gunicorn_conf.py`:\n```python\nbind = \"0.0.0.0:8000\"\nworkers = 4\nworker_class = \"sync\"\ntimeout = 120\n```\n\nRun with config file:\n```bash\ngunicorn redicserv:app -c gunicorn_conf.py\n```\n\nThe server will redirect all incoming requests (any path)\nto the specified URL with HTTP 302 status code (temporary redirect).\nFor permanent redirects, change the code parameter to `301`\nin the `redirect()` call.\n\n```bash\nexport REDIRECT_URL=\"https://google.com\"\ngunicorn redicserv:app -b 0.0.0.0:8000\n```\n\n## Licence\n\nThis project is licensed under the Apache 2.0 License.\nSee the file [LICENSE](LICENSE) for more details, contact me please.\n\n## Contact\n\nFor your question or suggestion, contact me please :\n\n- **Names**: DOCTOR MOKIRA\n- **Email**: dr.mokira@gmail.com\n- **GitHub**: [mokira3d48](https://github.com/mokira3d48)\n- **GitLab**: [mokira3d48](https://gitlab.com/mokira3d48)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmokira3d48%2Fredic_serv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmokira3d48%2Fredic_serv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmokira3d48%2Fredic_serv/lists"}