{"id":16564042,"url":"https://github.com/preichenberger/rack-vhost","last_synced_at":"2026-03-17T16:09:20.703Z","repository":{"id":5395904,"uuid":"6585041","full_name":"preichenberger/rack-vhost","owner":"preichenberger","description":"Simple Rack middleware to route via host header","archived":false,"fork":false,"pushed_at":"2013-02-21T08:22:37.000Z","size":152,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-15T13:55:52.041Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preichenberger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-07T19:36:54.000Z","updated_at":"2018-08-08T04:06:24.000Z","dependencies_parsed_at":"2022-07-06T15:02:42.173Z","dependency_job_id":null,"html_url":"https://github.com/preichenberger/rack-vhost","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/preichenberger/rack-vhost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preichenberger%2Frack-vhost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preichenberger%2Frack-vhost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preichenberger%2Frack-vhost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preichenberger%2Frack-vhost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preichenberger","download_url":"https://codeload.github.com/preichenberger/rack-vhost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preichenberger%2Frack-vhost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30626921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-10-11T20:43:07.157Z","updated_at":"2026-03-17T16:09:20.686Z","avatar_url":"https://github.com/preichenberger.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"rack-vhost\n==========\n\nRack middleware to dispatch to an application via host header.\n\nInstall gem:\n\n    gem install rack-vhost\n\nor in Gemfile:\n\n    source :rubygems\n    gem 'rack-vhost'\n\nExample config.ru:\n\n    require 'rack/vhost'\n\n    class Router\n      def call(env)\n        [200, { 'Content-Type' =\u003e 'text/plain' }, 'Router app']\n      end\n    end\n\n    class APIApp\n      def call(env)\n        [200, { 'Content-Type' =\u003e 'text/plain' }, 'API app']\n      end\n    end\n\n    class MainApp\n      def call(env)\n        [200, { 'Content-Type' =\u003e 'text/plain' }, 'Main app']\n      end\n    end\n\n    # This should come after all other middleware since it passes directly to the app\n    use Rack::Vhost, :vhost =\u003e '^api', :app =\u003e APIApp.new\n    use Rack::Vhost, :vhost =\u003e 'www.philcolabs.com', :app =\u003e MainApp.new\n    run Router.new\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreichenberger%2Frack-vhost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreichenberger%2Frack-vhost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreichenberger%2Frack-vhost/lists"}