fluent-plugin-modsecurity 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/fluent-plugin-modsecurity.gemspec +1 -1
- data/lib/fluent/plugin/filter_modsecurity.rb +9 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81e7dfce53973abd454cff78d21b26e24ebf6810
|
4
|
+
data.tar.gz: 1d81a3728531e98e843735a9a808e34ad4efa2c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0910b5f503f0accccc610dcc062e38bb9a72df1b5fabb83b4780675898ce6f14642e15c5ce77f239229848666cf62d96879011292736cade790d946d08ea0bcf
|
7
|
+
data.tar.gz: 317d7de37ec962f789d5124de0695014fb707e32f89adbaab67b79228efba17911f6018277a6030543b3a5f86374f81401b517105463784f8ff711c42bdcd6a1
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'fluent-plugin-modsecurity'
|
6
|
-
s.version = '0.1.
|
6
|
+
s.version = '0.1.4'
|
7
7
|
s.authors = ['kaija']
|
8
8
|
s.email = ['kaija.chang@gmail.com']
|
9
9
|
s.description = %q{modsecurity filter plugin for Fluent detail log. more detail please see https://github.com/kaija/fluent-plugin-modsecurity}
|
@@ -16,13 +16,15 @@ class Fluent::ModsecurityFilter < Fluent::Filter
|
|
16
16
|
def filter(tag, time, record)
|
17
17
|
log_path = ""
|
18
18
|
record.each{ |key, value|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
if value.is_a?(String)
|
20
|
+
token = value.split(" ")
|
21
|
+
token.each { |v|
|
22
|
+
if v.start_with?(@path_prefix)
|
23
|
+
log_path = v
|
24
|
+
break
|
25
|
+
end
|
26
|
+
}
|
27
|
+
end
|
26
28
|
}
|
27
29
|
#find detail log and append to record
|
28
30
|
unless log_path.to_s.strip.empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-modsecurity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaija
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|