rack-http-enforcer 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +22 -1
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -1,6 +1,27 @@
|
|
1
1
|
= rack-http-enforcer
|
2
2
|
|
3
|
-
|
3
|
+
Rack::HttpEnforcer is a simple Rack middleware to enforce HTTP connections
|
4
|
+
|
5
|
+
== Installation
|
6
|
+
|
7
|
+
gem install rack-http-enforcer
|
8
|
+
|
9
|
+
== Usage
|
10
|
+
|
11
|
+
require 'rack-http-enforcer'
|
12
|
+
use Rack::HttpEnforcer
|
13
|
+
|
14
|
+
This will redirect all non HTTP requests to HTTP.
|
15
|
+
|
16
|
+
If you want to redirect non HTTP requests to a specific URL, then you may give the :redirect_to option:
|
17
|
+
|
18
|
+
use Rack::HttpEnforcer, :redirect_to => 'http://example.org'
|
19
|
+
|
20
|
+
Also, you specify set the :redirect_to option as Proc:
|
21
|
+
|
22
|
+
use Rack::HttpEnforcer, :redirect_to =>
|
23
|
+
|
24
|
+
|
4
25
|
|
5
26
|
== Contributing to rack-http-enforcer
|
6
27
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-http-enforcer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rudolf Schmidt
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-21 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|