redirect-rails 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redirect/middleware.rb +1 -1
- data/lib/redirect/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f8daaae55ea15a53bea6dac7a5699f7167414e6eec3ed0b64314f4aeac2e272
|
4
|
+
data.tar.gz: 48a60747d0a970f3e05d7e2bf445d62ebcd18b61baed41c43ea50ddec4a447a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79d86e2e879d8cd790df0e9e3cfdf8a593203f9c7981b73ac09b8e9ea11b4de466cb70a7ce0cb881287769d95b126d3e0990bf3b54189a933f9ceb1c2a283aa8
|
7
|
+
data.tar.gz: 65c91d8c654d2ee7ef3c13828280d921ff4ce29e83b6239dcd76f71389425d2e14a9c493f237eac921191a885f2bfd4b63a77dfdce99af7682dd8396d51625b9
|
data/lib/redirect/middleware.rb
CHANGED
@@ -36,9 +36,9 @@ module Redirect
|
|
36
36
|
|
37
37
|
def redirect_to(uri)
|
38
38
|
headers = { "Location": uri,
|
39
|
-
"Content-Type": @request["Content-Type"],
|
40
39
|
"Pragma": "no-cache",
|
41
40
|
"Cache-Control": "no-cache; max-age=0" }
|
41
|
+
headers["Content-Type"] = @request["Content-Type"] if @request.has_key?("Content-Type")
|
42
42
|
[302, headers, [redirect_message(uri)]]
|
43
43
|
end
|
44
44
|
|