{"id":21479302,"url":"https://github.com/rycus86/redirect-server","last_synced_at":"2025-08-26T12:08:35.421Z","repository":{"id":66144747,"uuid":"118021766","full_name":"rycus86/redirect-server","owner":"rycus86","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-28T06:05:29.000Z","size":41,"stargazers_count":6,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-15T22:06:16.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rycus86.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}},"created_at":"2018-01-18T18:30:37.000Z","updated_at":"2019-08-15T08:24:46.000Z","dependencies_parsed_at":"2024-05-06T22:26:09.836Z","dependency_job_id":"2d88dcf5-5e21-4687-9e9e-d64c88a11532","html_url":"https://github.com/rycus86/redirect-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rycus86/redirect-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rycus86%2Fredirect-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rycus86%2Fredirect-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rycus86%2Fredirect-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rycus86%2Fredirect-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rycus86","download_url":"https://codeload.github.com/rycus86/redirect-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rycus86%2Fredirect-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272219236,"owners_count":24894383,"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-08-26T02:00:07.904Z","response_time":60,"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":[],"created_at":"2024-11-23T11:24:33.472Z","updated_at":"2025-08-26T12:08:35.398Z","avatar_url":"https://github.com/rycus86.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Redirect Server\n\n*A minimalistic Flask application to redirect incoming URLs.*\n\n## Purpose\n\nThis application uses *YAML* configuration to define the HTTP redirects it supports.\nIt can deal with simple, exact-match rules and also regular expressions with substitutions.\n\n\u003e If you only need these two, better look at a *proper* webserver, like\n\u003e [Nginx](https://www.nginx.com/) or [Apache httpd](https://httpd.apache.org/).\n \nThis project can also provide a simple admin page to add new rules ad-hoc.\n\n## Running\n\nTo run the application, simply execute:\n\n```shell\n$ python app.py\n```\n\nTo allow connections from anywhere, and to use a custom HTTP port, use:\n\n```shell\n$ HTTP_HOST=0.0.0.0 HTTP_PORT=8080 python app.py\n```\n\nYou also can (and should) override the default secret key for managing sessions,\nthrough the `SECRET_KEY` environment variable, or a key-value pair with the same name\nread from the `/var/secrets/flask` file.\n\nYou can also run the application as a Docker container:\n\n```shell\n$ docker run --rm -it     \\\n    -e HTTP_HOST=0.0.0.0  \\\n    -e HTTP_PORT=8080     \\\n    -p 80:8080            \\\n    rycus86/redirect-server\n```\n\n## Configuration\n\nThe application will read rules from *YAML* files found in the `RULES_DIR` directory that\nhave `yml`, `yaml` or `rules` extension.\n\nA simple configuration, with the admin UI enabled, looks like this:\n\n```yaml\nrules:\n  - source: /google\n    target: https://google.com\n    ttl: 30d\n\n  - source: /campaign/(.+)\n    target: https://my.site.com/?cmp=\\1\n    regex: true\n    code: 302\n  \n  - source: /with/headers\n    target: https://some.site.com/landing-page\n    headers:\n      X-Server: redirect-server\n      X-Location: landing-page\n\nadmin:\n  path: /admin-page\n  username: admin\n  password: admin\n```\n\nYou can specify the admin password as MD5 or SHA1 hash as well:\n\n```yaml\nadmin:\n  path: /admin\n  username: admin\n  password:\n    md5: 65ed8a5eec59a1a6f75ec845294aead8\n\nadmin:\n  path: /admin\n  username: admin\n  password:\n    sha1: b37958f21be0b97c823f63ccc45b12368235575f\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frycus86%2Fredirect-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frycus86%2Fredirect-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frycus86%2Fredirect-server/lists"}