HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
github
secure_headers
Ruby2013–2016
github / secure_headers

secure_headers

Manages application of security headers with many safe defaults

6Distinct people
6Mentions
0Explicit recommenders
3.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Manages application of security headers with many safe defaults

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year6 dated mentions

Observed mentions: 2013-01-23 16:49:21 UTC to 2016-10-24 16:01:52 UTC.

0122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2016

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC211
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC202
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101

What Hacker News says

6 sources
Just to illustrate a potential scenario: You use a piece of open source software that has a javascript file which the author has hosted on a CDN. In order to mitigate an attack where someone changes the content of the javascript file you use a hash[1] to ensure the file does not change. You think you are safe, but a malicious actor gets access to the CDN and instead of changing the file, instead builds a quick scripts that looks for password reset referrer patterns and races the human to reset the password first. A computer is probably going to win that game that majority of the time. [1] https://github.com/twitter/secureheaders#hash
In Is Your Site Leaking Password Reset Links?
Some ideas for a general strategy: * Check TLS/SSL https://www.ssllabs.com/ssltest/ * Use Https, HSTS * Have a security response page if someone found a problem * What to do if your application was compromised, be prepared for the worst * Check and update your software regularly * Review changes in your software regularly if it impacts your overall security strategy * Keep a security checklist in your codebase * Do your own code audits, just read it again after a few days and ask the right questions * Remove all credentials from your codebase * Read about the "new" security headers here: https://github.com/twitter/secureheaders * Know what kind of/how many requests your API/web app gets, maybe throttle or block some
In Ask HN: How do you take care of security risks at your startup?
Working with Clojure, I used to be jealous that the eco-system around Ruby had gems as good as this: https://github.com/twitter/secureheaders Just reading the README is a bit of an education about Content Security Policy (CSP). But over the last 2 years I've been impressed by how much the eco-system around Clojure has been catching up, and the new Ring Defaults is an example of that. These automatic security features are the kinds of things that drive people toward monolithic frameworks (so they can get these benefits without having to think about it) but I'm increasingly able to get these things (almost) automatically in the world of Clojure, while still keeping to the Clojure convention of using small, composable libraries, rather than monolithic apps (and for the micro-services I build, monolithic apps are not an option). :anti-forgery
Read the rest
- Set to true to add CSRF protection via the ring-anti-forgery library. :content-type-options - Prevents attacks based around media-type confusion. See: wrap-content-type-options. :frame-options - Prevents your site from being placed in frames or iframes. See: wrap-frame-options. :hsts - If true, enable HTTP Strict Transport Security. See: wrap-hsts. :ssl-redirect - If true, redirect all HTTP requests to the equivalent HTTPS URL. A map with an :ssl-port option may be set instead, if the HTTPS server is on a non-standard port. See: wrap-ssl-redirect. :xss-protection - Enable the X-XSS-Protection header that tells supporting browsers to use heuristics to detect XSS attacks. See: wrap-xss-protection.
In Clojure Ring Defaults

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.