|
1 | 1 |
|
2 | 2 | # CloudFront Access Log Parser |
3 | 3 |
|
4 | | -This is a log parser for Cloudfront Web Distribution and RTMP Distribution access logs. It can be used for directly or with the Node.js Stream API. |
| 4 | +This is a log parser for Cloudfront Web Distribution and RTMP Distribution access logs. It can be called directly or with the Node.js Stream API. |
5 | 5 |
|
6 | 6 | [](https://travis-ci.org/claygregory/node-cloudfront-log-parser) |
7 | 7 | [](https://coveralls.io/github/claygregory/node-cloudfront-log-parser?branch=master) |
@@ -41,9 +41,9 @@ const fs = require('fs'); |
41 | 41 | const zlib = require('zlib'); |
42 | 42 |
|
43 | 43 | const parser = new CloudFrontParser({ format: 'web' }); |
44 | | -parser.on('readable', function(){ |
| 44 | +parser.on('readable', function () { |
45 | 45 | let access; |
46 | | - while(access = parser.read()){ |
| 46 | + while (access = parser.read()) { |
47 | 47 | //access = parsed entry object |
48 | 48 | } |
49 | 49 | }); |
@@ -110,7 +110,11 @@ const options = { |
110 | 110 | 'cs-uri-query': 'key=value', |
111 | 111 | 'c-referrer': 'http://player.example.com/player.swf', |
112 | 112 | 'x-page-url': 'http://www.example.com/video', |
113 | | - 'c-user-agent': 'LNX 10,0,32,18' } |
| 113 | + 'c-user-agent': 'LNX 10,0,32,18', |
| 114 | + 'x-sname': '-', |
| 115 | + 'x-sname-query': '-', |
| 116 | + 'x-file-ext': '-', |
| 117 | + 'x-sid': '-' } |
114 | 118 | ``` |
115 | 119 |
|
116 | 120 | ## License |
|
0 commit comments