Sha256: 52451a18a38db3201f0b5f9eb212c9c3e3838b89236f861da5616cb6247ff9de
Contents?: true
Size: 563 Bytes
Versions: 2
Compression:
Stored size: 563 Bytes
Contents
require_relative "../lib/tynn/hsts" test "hsts header" do |app| Tynn.plugin(Tynn::HSTS) Tynn.define do end app = Tynn::Test.new app.get("/", {}) header = app.res.headers["Strict-Transport-Security"] assert_equal "max-age=15552000; includeSubdomains", header end test "hsts header options" do |app| Tynn.plugin(Tynn::HSTS, expires: 1, subdomains: false, preload: true) Tynn.define do end app = Tynn::Test.new app.get("/", {}) header = app.res.headers["Strict-Transport-Security"] assert_equal "max-age=1; preload", header end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tynn-1.2.0 | test/hsts_test.rb |
tynn-1.1.0 | test/hsts_test.rb |