{"id":13721665,"url":"https://github.com/StalkR/hsts","last_synced_at":"2025-05-07T14:30:39.659Z","repository":{"id":55155870,"uuid":"38195872","full_name":"StalkR/hsts","owner":"StalkR","description":"Go HTTP Strict Transport Security library","archived":false,"fork":false,"pushed_at":"2024-04-28T14:47:32.000Z","size":5524,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-28T15:42:18.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/StalkR/hsts","language":"Go","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/StalkR.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}},"created_at":"2015-06-28T11:07:53.000Z","updated_at":"2024-06-19T02:42:36.567Z","dependencies_parsed_at":"2024-04-28T15:50:23.278Z","dependency_job_id":null,"html_url":"https://github.com/StalkR/hsts","commit_stats":{"total_commits":49,"total_committers":2,"mean_commits":24.5,"dds":0.4285714285714286,"last_synced_commit":"8265d93f634c464e2b50391915ee8fb4137a6e4f"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StalkR%2Fhsts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StalkR%2Fhsts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StalkR%2Fhsts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StalkR%2Fhsts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StalkR","download_url":"https://codeload.github.com/StalkR/hsts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895472,"owners_count":21821167,"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":[],"created_at":"2024-08-03T01:01:19.957Z","updated_at":"2025-05-07T14:30:38.630Z","avatar_url":"https://github.com/StalkR.png","language":"Go","funding_links":[],"categories":["Libraries","Web Framework Hardening"],"sub_categories":[],"readme":"# HTTP Strict Transport Security (HSTS)\n\n[![Build Status][1]][2] [![Godoc][3]][4]\n\nhttp [RoundTripper][8] implementing [HTTP Strict Transport Security][6]\n([RFC 6797][7]) with sites preloaded from [Chromium][9] using `go generate`.\n\nInstall:\n\n\tgo get github.com/StalkR/hsts\n\nUsage (taken from the example in [godoc][4]):\n\n\tclient := http.DefaultClient\n\t// Wrap around the client's transport to add HSTS support.\n\tclient.Transport = hsts.New(client.Transport)\n\n\t// Assuming example.com has set up HSTS, we learn it at the first HTTPS request.\n\tresp, err := client.Get(\"https://example.com\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer resp.Body.Close()\n\n\t// So that any following request made in insecure HTTP would go in HTTPS.\n\tresp, err = client.Get(\"http://example.com\") // will become HTTPS\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer resp.Body.Close()\n\nBugs, comments, questions: create a [new issue][5].\n\n[1]: https://github.com/StalkR/hsts/actions/workflows/build.yml/badge.svg\n[2]: https://github.com/StalkR/hsts/actions/workflows/build.yml\n[3]: https://godoc.org/github.com/StalkR/hsts?status.png\n[4]: https://godoc.org/github.com/StalkR/hsts\n[5]: https://github.com/StalkR/hsts/issues/new\n[6]: https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security\n[7]: https://tools.ietf.org/html/rfc6797\n[8]: https://godoc.org/net/http#RoundTripper\n[9]: https://www.chromium.org/hsts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStalkR%2Fhsts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStalkR%2Fhsts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStalkR%2Fhsts/lists"}