{"id":13758739,"url":"https://github.com/jordan-wright/unindexed","last_synced_at":"2025-03-22T05:30:47.699Z","repository":{"id":57488393,"uuid":"159905424","full_name":"jordan-wright/unindexed","owner":"jordan-wright","description":"A Golang HTTP FileSystem that disables directory indexing","archived":false,"fork":false,"pushed_at":"2021-12-07T22:58:56.000Z","size":9,"stargazers_count":28,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T08:21:35.831Z","etag":null,"topics":["golang","http"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/jordan-wright.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":"2018-12-01T03:32:51.000Z","updated_at":"2024-11-27T13:28:34.000Z","dependencies_parsed_at":"2022-08-29T15:01:40.355Z","dependency_job_id":null,"html_url":"https://github.com/jordan-wright/unindexed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordan-wright%2Funindexed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordan-wright%2Funindexed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordan-wright%2Funindexed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordan-wright%2Funindexed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jordan-wright","download_url":"https://codeload.github.com/jordan-wright/unindexed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244912800,"owners_count":20530764,"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":["golang","http"],"created_at":"2024-08-03T13:00:35.818Z","updated_at":"2025-03-22T05:30:45.763Z","avatar_url":"https://github.com/jordan-wright.png","language":"Go","readme":"# unindexed\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/jordan-wright/unindexed)](https://goreportcard.com/report/github.com/jordan-wright/unindexed) [![GoDoc](https://godoc.org/github.com/gophish/gophish?status.svg)](https://godoc.org/github.com/gophish/gophish) ![[TravisCI](https://travis-ci.org/jordan-wright/unindexed.svg?branch=master)](https://travis-ci.org/jordan-wright/unindexed.svg?branch=master)\n\nA Golang HTTP FileSystem that disables directory indexing.\n\n## Motivation\n\nBy default, the `http.Dir` filesystem has [directory indexing enabled](https://www.owasp.org/index.php/OWASP_Periodic_Table_of_Vulnerabilities_-_Directory_Indexing). For example, let's say you have a `.git/` folder at the root of the folder you're serving. If someone were to request `your_url/.git/`, the contents of the folder would be listed.\n\nThis package disables directory indexing, preventing the contents from being listed.\n\n## Installation\n\n```\ngo get -u github.com/jordan-wright/unindexed\n```\n\n## Usage\n\nThe easiest way to use `unindexed` is as a drop-in replacement for `http.Dir`, which is commonly used to serve static files.\n\nHere's a simple example using the `gorilla/mux` router:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/jordan-wright/unindexed\"\n)\n\nfunc main() {\n\trouter := mux.NewRouter()\n\trouter.PathPrefix(\"/\").Handler(http.FileServer(unindexed.Dir(\"../static\")))\n\tlog.Fatal(http.ListenAndServe(\":8080\", router))\n}\n```\n\nOther examples can be found in the `examples/` directory.","funding_links":[],"categories":["Web Framework Hardening"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordan-wright%2Funindexed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjordan-wright%2Funindexed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordan-wright%2Funindexed/lists"}