{"id":19210081,"url":"https://github.com/nkkollaw/reserved-subdomains","last_synced_at":"2025-08-22T03:32:13.228Z","repository":{"id":50889338,"uuid":"84572455","full_name":"nkkollaw/reserved-subdomains","owner":"nkkollaw","description":"List of subdomains that could be candidates for reservation in multitenant app/ subdomain validator for multitenant apps","archived":false,"fork":false,"pushed_at":"2020-03-06T11:35:04.000Z","size":25,"stargazers_count":75,"open_issues_count":0,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-26T07:45:30.448Z","etag":null,"topics":["multitenancy","php","saas","subdomain","yaml"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/nkkollaw.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}},"created_at":"2017-03-10T15:14:55.000Z","updated_at":"2024-04-25T15:52:10.000Z","dependencies_parsed_at":"2022-08-25T15:51:10.080Z","dependency_job_id":null,"html_url":"https://github.com/nkkollaw/reserved-subdomains","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkollaw%2Freserved-subdomains","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkollaw%2Freserved-subdomains/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkollaw%2Freserved-subdomains/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkollaw%2Freserved-subdomains/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nkkollaw","download_url":"https://codeload.github.com/nkkollaw/reserved-subdomains/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230121666,"owners_count":18176477,"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","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":["multitenancy","php","saas","subdomain","yaml"],"created_at":"2024-11-09T13:34:32.835Z","updated_at":"2024-12-20T08:08:56.598Z","avatar_url":"https://github.com/nkkollaw.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subdomains\nList of subdomains that could be candidates for reservation in multitenant app/ subdomain validator for multitenant apps\n\n## YAML list\n\nThis is a simple list of subdomains in YAML (I picked YAML over JSON because you can easily add comments).\n\nSubdomains are added as a simple list (ex. `www`, `smtp`, etc.). Regular expressions are supported but MUST be quoted and delimited by slashes (ex. `\"/www[0-9]+/\"`).\n\n## Validators\n\n### PHP implementation\n\nSubdomain validator for multitenant apps written in PHP. Simply checks if a subdomain is in the list.\n\n#### Installation\n\n    composer require nkkollaw/reserved-subdomains\n    \n#### Usage\n\n    Bool \\nkkollaw\\Multitenancy\\Validators\\Subdomain::isReserved($subdomain[, $yaml_file]);\n\nExample:\n\n    $subdomain = 'www2';\n    if (\\nkkollaw\\Multitenancy\\Validators\\Subdomain::isReserved($subdomain)) {\n        throw new Exception('Sorry, subdomain is reserved');\n    }\n\n## Contributing\n\nPull requests are welcome.\n\nIt would  be nice to implement a validator in different languages (Node, Ruby? PHP is in /php)\n\nThe following \\*nix commands might be useful while editing the list:\n\n    cat reserved-subdomains.yaml | sort # sort entries\n    \n    awk '{if (++dup[$0] == 1) print $0;}' reserved-subdomains.yaml # remove duplicates\n    \n    awk '{if (++dup[$0] == 1) print $0;}' reserved-subdomains.yaml | sort # remove duplicates + sort\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkkollaw%2Freserved-subdomains","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnkkollaw%2Freserved-subdomains","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkkollaw%2Freserved-subdomains/lists"}