lib/tynn/hsts.rb in tynn-1.0.0 vs lib/tynn/hsts.rb in tynn-1.1.0
- old
+ new
@@ -7,11 +7,11 @@
# Examples
#
# require "tynn"
# require "tynn/hsts"
#
- # Tynn.helpers(Tynn::HSTS)
+ # Tynn.plugin(Tynn::HSTS)
#
# Tynn.define { }
#
# Tynn.call("PATH_INFO" => "/")[1]["Strict-Transport-Security"]
# # => "max-age=15552000; includeSubdomains"
@@ -31,11 +31,11 @@
# and submit your domain to this {form}[https://hstspreload.appspot.com/].
# Supported by Chrome, Firefox, IE11+ and IE Edge.
#
# Examples
#
- # Tynn.helpers(
+ # Tynn.plugin(
# Tynn::HSTS,
# expires: 31_536_000,
# includeSubdomains: true,
# preload: true
# )
@@ -47,10 +47,10 @@
#
# To disable HSTS, you will need to tell the browser to expire it immediately.
#
# Examples
#
- # Tynn.helpers(Tynn::HSTS, expires: 0)
+ # Tynn.plugin(Tynn::HSTS, expires: 0)
#
module HSTS
# Internal: Sets the HSTS header as a default header.
def self.setup(app, options = {})
header = sprintf("max-age=%i", options.fetch(:expires, 15_552_000))