{"id":13721639,"url":"https://github.com/gosecguy/beego-security-headers","last_synced_at":"2025-05-07T14:30:36.453Z","repository":{"id":57516534,"uuid":"135123452","full_name":"gosecguy/beego-security-headers","owner":"gosecguy","description":"beego framework filter for easy security headers management","archived":false,"fork":false,"pushed_at":"2019-01-17T08:33:19.000Z","size":130,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-02-15T07:37:23.398Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gosecguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security_headers.go","support":null}},"created_at":"2018-05-28T07:12:52.000Z","updated_at":"2022-09-28T22:22:40.000Z","dependencies_parsed_at":"2022-09-26T18:01:22.110Z","dependency_job_id":null,"html_url":"https://github.com/gosecguy/beego-security-headers","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosecguy%2Fbeego-security-headers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosecguy%2Fbeego-security-headers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosecguy%2Fbeego-security-headers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosecguy%2Fbeego-security-headers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gosecguy","download_url":"https://codeload.github.com/gosecguy/beego-security-headers/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.636Z","updated_at":"2025-05-07T14:30:36.115Z","avatar_url":"https://github.com/gosecguy.png","language":"Go","funding_links":[],"categories":["Web Framework Hardening"],"sub_categories":[],"readme":"beego-security-headers\n======================\n\n_beego-security-headers_ is a [beego framework][beegof] filter which allows\n[HTTP response security headers][owaspsh] to be easily managed on application's\nconfiguration file.\n\nAfter adding _beego-security-headers_ to your application, you can test it at\n[securityheaders.com][sechcom].\n\n## How to use\n\n1. Download **beego-security-headers** package\n    ```bash\n    go get github.com/gosecguy/beego-security-headers\n    ```\n2. Import the package on your application's `main.go`\n    ```go\n    import securityHeaders \"github.com/gosecguy/beego-security-headers\"\n    ```\n3. add the following line to your application `main` function\n    ```go\n    securityHeaders.Init()\n    ```\n4. edit your `conf/app.conf` file with the desired security headers\n    ```\n    [secheaders]\n    x-xss-protection = \"1; mode=block\"\n    x-frame-options = \"DENY\"\n    x-content-type-options = \"nosniff\"\n    strict-transport-security = \"max-age=315360000\"\n    referrer-policy = \"same-origin\"\n    ```\n\n## Example\n\nTo run beego ToDo application with _beego-security-headers_, run\n\n```\n$ docker build -t beego-security-headers:example .\n```\n\nfollowed by\n\n```\n$ docker run -it --rm -p 8080:8080 beego-security-headers:example\n```\n\nThen visit http://localhost:8080 and open Developer Tools.\nSwitch to the Network tab and select the first `GET` request to inspect HTTP\nrequest headers\n\n![Network panel][screenshot]\n\n## License\n\nCopyright (c) 2018\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n[beegof]: https://beego.me/\n[owaspsh]: https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#tab=Headers\n[sechcom]: https://securityheaders.com/\n[screenshot]: screenshot.png\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgosecguy%2Fbeego-security-headers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgosecguy%2Fbeego-security-headers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgosecguy%2Fbeego-security-headers/lists"}