Skip to content

Commit 90455ad

Browse files
committed
Fix method name in host_authorization plugin documentation (Fixes #414)
1 parent df3d7df commit 90455ad

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/roda/plugins/host_authorization.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Roda
55
module RodaPlugins
66
# The host_authorization plugin allows configuring an authorized host or
77
# an array of authorized hosts. Then in the routing tree, you can check
8-
# whether the request uses an authorized host via the +check_host_authorized!+
8+
# whether the request uses an authorized host via the +check_host_authorization!+
99
# method.
1010
#
1111
# If the request doesn't match one of the authorized hosts, the
@@ -16,23 +16,23 @@ module RodaPlugins
1616
# By default, an empty response using status 403 will be returned for requests
1717
# with unauthorized hosts.
1818
#
19-
# Because +check_host_authorized!+ is an instance method, you can easily choose
19+
# Because +check_host_authorization!+ is an instance method, you can easily choose
2020
# to only check for authorization in certain routes, or to check it after
2121
# other processing. For example, you could check for authorized hosts after
2222
# serving static files, since the serving of static files should not be
2323
# vulnerable to DNS rebinding attacks.
2424
#
2525
# = Usage
2626
#
27-
# In your routing tree, call the +check_host_authorized!+ method at the point you
27+
# In your routing tree, call the +check_host_authorization!+ method at the point you
2828
# want to check for authorized hosts:
2929
#
3030
# plugin :host_authorization, 'www.example.com'
3131
# plugin :public
3232
#
3333
# route do |r|
3434
# r.public
35-
# check_host_authorized!
35+
# check_host_authorization!
3636
#
3737
# # ...
3838
# end
@@ -153,4 +153,3 @@ def host_authorization_unauthorized(_)
153153
register_plugin(:host_authorization, HostAuthorization)
154154
end
155155
end
156-

0 commit comments

Comments
 (0)