{"id":46064468,"url":"https://github.com/gowww/secure","last_synced_at":"2026-03-01T12:06:06.418Z","repository":{"id":57499500,"uuid":"96046117","full_name":"gowww/secure","owner":"gowww","description":"🔑 Security utilities, CSP, HPKP, HSTS and other security wins","archived":false,"fork":false,"pushed_at":"2020-09-15T14:27:33.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T09:18:53.039Z","etag":null,"topics":["csp","go","golang","good-practices","hpkp","hsts","http","https","policy","secure","security","ssl"],"latest_commit_sha":null,"homepage":"","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/gowww.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-07-02T20:03:45.000Z","updated_at":"2020-09-15T14:27:35.000Z","dependencies_parsed_at":"2022-08-28T15:22:27.408Z","dependency_job_id":null,"html_url":"https://github.com/gowww/secure","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gowww/secure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowww%2Fsecure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowww%2Fsecure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowww%2Fsecure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowww%2Fsecure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gowww","download_url":"https://codeload.github.com/gowww/secure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowww%2Fsecure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T11:43:06.159Z","status":"ssl_error","status_checked_at":"2026-03-01T11:43:03.887Z","response_time":124,"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":["csp","go","golang","good-practices","hpkp","hsts","http","https","policy","secure","security","ssl"],"created_at":"2026-03-01T12:06:04.343Z","updated_at":"2026-03-01T12:06:06.402Z","avatar_url":"https://github.com/gowww.png","language":"Go","readme":"# [![gowww](https://avatars.githubusercontent.com/u/18078923?s=20)](https://github.com/gowww) secure [![GoDoc](https://godoc.org/github.com/gowww/secure?status.svg)](https://godoc.org/github.com/gowww/secure) [![Build](https://travis-ci.org/gowww/secure.svg?branch=master)](https://travis-ci.org/gowww/secure) [![Coverage](https://coveralls.io/repos/github/gowww/secure/badge.svg?branch=master)](https://coveralls.io/github/gowww/secure?branch=master) [![Go Report](https://goreportcard.com/badge/github.com/gowww/secure)](https://goreportcard.com/report/github.com/gowww/secure) ![Status Testing](https://img.shields.io/badge/status-testing-orange.svg)\n\nPackage [secure](https://godoc.org/github.com/gowww/secure) provides security utilities, CSP, HPKP, HSTS and other security wins.\n\n## Installing\n\n1. Get package:\n\n   ```Shell\n   go get -u github.com/gowww/secure\n   ```\n\n2. Import it in your code:\n\n   ```Go\n   import \"github.com/gowww/secure\"\n   ```\n\n## Usage\n\nTo wrap an [http.Handler](https://golang.org/pkg/net/http/#Handler), use [Handle](https://godoc.org/github.com/gowww/secure#Handle):\n\n```Go\nmux := http.NewServeMux()\n\nmux.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprint(w, \"Hello\")\n})\n\nhttp.ListenAndServe(\":8080\", secure.Handle(mux, nil))\n```\n\nTo wrap an [http.HandlerFunc](https://golang.org/pkg/net/http/#HandlerFunc), use [HandleFunc](https://godoc.org/github.com/gowww/secure#HandleFunc):\n\n```Go\nhttp.Handle(\"/\", secure.HandleFunc(func(w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprint(w, \"Hello\")\n}, nil))\n\nhttp.ListenAndServe(\":8080\", nil)\n```\n\nTo set custom security options, see [Options](https://godoc.org/github.com/gowww/secure#Options) GoDoc reference.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgowww%2Fsecure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgowww%2Fsecure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgowww%2Fsecure/lists"}