{"id":46823682,"url":"https://github.com/saihon/referrer","last_synced_at":"2026-03-10T09:38:06.384Z","repository":{"id":57522104,"uuid":"185059798","full_name":"saihon/referrer","owner":"saihon","description":"Referrer policy for Go language","archived":false,"fork":false,"pushed_at":"2019-05-05T17:12:10.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-06-20T00:35:23.021Z","etag":null,"topics":["golang","referer","referrer"],"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/saihon.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":"2019-05-05T17:07:48.000Z","updated_at":"2019-05-05T17:12:11.000Z","dependencies_parsed_at":"2022-08-26T23:40:42.576Z","dependency_job_id":null,"html_url":"https://github.com/saihon/referrer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/saihon/referrer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saihon%2Freferrer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saihon%2Freferrer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saihon%2Freferrer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saihon%2Freferrer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saihon","download_url":"https://codeload.github.com/saihon/referrer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saihon%2Freferrer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30328844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"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":["golang","referer","referrer"],"created_at":"2026-03-10T09:38:05.947Z","updated_at":"2026-03-10T09:38:06.368Z","avatar_url":"https://github.com/saihon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## referrer\n\n[![Build Status](https://travis-ci.org/saihon/referrer.svg?branch=master)](https://travis-ci.org/saihon/referrer) [![GoDoc](https://godoc.org/github.com/saihon/referrer?status.svg)](https://godoc.org/github.com/saihon/referrer)\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## example\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/saihon/referrer\"\n)\n\nfunc main() {\n\tr := referrer.New()\n\tr.SetPolicy(referrer.POLICY_ORIGIN_WHEN_CROSS_ORIGIN)\n\n\tfromURL := \"http://example.com/from\"\n\ttoURL := \"http://example.com/to\"\n\n\treq, err := http.NewRequest(`GET`, toURL, nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\treferer, ok := r.Make(fromURL, toURL)\n\t// set referer\n\tif ok {\n\t\treq.Header.Set(\"Referer\", referer)\n\t}\n\n\thttp.DefaultClient.Do(req)\n}\n\n```\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaihon%2Freferrer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaihon%2Freferrer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaihon%2Freferrer/lists"}