mistiq 0.0.92 → 0.0.921
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/mistiq/middleware.rb +17 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDA5MDBhNzU0ZjE5MTY2NjcwOTM1NjJiMDQzZDViMzdhMTc5ZTlmNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzM4ZWI2YmYyZGQ3MGE4MTgwNTIwZjJhZmI5NTJhZmU5MmU5NzQ5Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWMzMjk4ZDk5ZGU1NTI1NzZkZDQ3NDllY2I1MDk0OGRjNjE1M2IyNzE3ZThi
|
10
|
+
NDIwZWRlNTU2Mzc3ZTY0NGUxNDA4ZWY1M2M5MjFkYWY3NGNhMzIzNmFhNjJi
|
11
|
+
N2Q0MWU5MTAzNWRkYzg3YzljNTkzZWJhMWNhYWIxNTcxNzJjMzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzJhNzlmODFiZmQ2YTI0OTljNTYzZjk0NDc2YzNiNDkyMDIzOWQzYTYwNGE4
|
14
|
+
YzY3ODE0MWVkYmY4MTY1MTI3OGRhZjdlMzExYTBmY2I4NjY5NzYyNWE2YmRj
|
15
|
+
YTY1NGMzNzM3NDgxNDViOGE1YjhlZDJiMTg2NTEyZTVhNmRlMjk=
|
data/lib/mistiq/middleware.rb
CHANGED
@@ -15,20 +15,24 @@ module Mistiq
|
|
15
15
|
|
16
16
|
#if the current file is an HTML document
|
17
17
|
if headers != nil && headers["Content-Type"] != nil && (headers["Content-Type"].include? "text/html")
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
if ENV['REGEX'] != nil
|
19
|
+
regex = ENV['REGEX'].split("@@@")
|
20
|
+
body = response.body
|
21
|
+
|
22
|
+
regex.each {
|
23
|
+
|r|
|
24
|
+
temp = body.gsub(/#{r}/,"")
|
25
|
+
if temp != nil
|
26
|
+
body = temp
|
27
|
+
end
|
28
|
+
}
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
#rebuild response
|
31
|
+
response = Rack::Response.new(body,status,headers)
|
32
|
+
response.finish
|
33
|
+
else
|
34
|
+
[status, headers, response]
|
35
|
+
end
|
32
36
|
else
|
33
37
|
[status, headers, response]
|
34
38
|
end
|