@@ -62,28 +62,28 @@ Basic implementation of proxy client may be found at https://github.com/GoMetric
6262
6363``` bash
6464statsd-http-proxy \
65- --verbose \
66- --http-host=127.0.0.1 \
67- --http-port=8080 \
68- --statsd-host=127.0.0.1 \
69- --statsd-port=8125 \
70- --jwt-secret=somesecret \
71- --metric-prefix=prefix.subprefix
65+ --verbose \
66+ --http-host=127.0.0.1 \
67+ --http-port=8080 \
68+ --statsd-host=127.0.0.1 \
69+ --statsd-port=8125 \
70+ --jwt-secret=somesecret \
71+ --metric-prefix=prefix.subprefix
7272```
7373
7474* Run server (HTTPS):
7575
7676``` bash
7777statsd-http-proxy \
78- --verbose \
79- --http-host=127.0.0.1 \
80- --http-port=433 \
81- --tls-cert=cert.pem \
82- --tls-key=key.pem \
83- --statsd-host=127.0.0.1 \
84- --statsd-port=8125 \
85- --jwt-secret=somesecret \
86- --metric-prefix=prefix.subprefix
78+ --verbose \
79+ --http-host=127.0.0.1 \
80+ --http-port=433 \
81+ --tls-cert=cert.pem \
82+ --tls-key=key.pem \
83+ --statsd-host=127.0.0.1 \
84+ --statsd-port=8125 \
85+ --jwt-secret=somesecret \
86+ --metric-prefix=prefix.subprefix
8787```
8888
8989Print server version and exit:
@@ -109,32 +109,15 @@ Command line arguments:
109109
110110Sample code to send metric in browser with JWT token in header:
111111
112- * HTTP:
113-
114112``` javascript
115113$ .ajax ({
116114 url: ' http://127.0.0.1:8080/count/some.key.name' ,
117115 method: ' POST' ,
118116 headers: {
119- ' X-JWT-Token' => ' some-jwt-token'
120- },
121- data: {
122- value: 100500
123- }
124- });
125- ```
126-
127- * HTTPS (if self-signed certificate is used it has to be accepted!):
128-
129- ``` javascript
130- $ .ajax ({
131- url: ' https://127.0.0.1:433/count/some.key.name' ,
132- method: ' POST' ,
133- headers: {
134- ' X-JWT-Token' => ' some-jwt-token'
117+ ' X-JWT-Token' : ' some-jwt-token'
135118 },
136119 data: {
137- value: 100500
120+ value: 100500
138121 }
139122});
140123```
@@ -145,7 +128,7 @@ Authentication is optional. It based on passing JWT token to server, encrypted w
145128command line argument. If secret not configured in ` jwt-secret ` , then requests to server accepted without authentication.
146129Token sends to server in ` X-JWT-Token ` header or in ` token ` query parameter.
147130
148- We recomment to use JWT tokens to prevent flood requests, setup JWT token expiration time, and update active JWT token in browser.
131+ We recommend to use JWT tokens to prevent flood requests, setup JWT token expiration time, and update active JWT token in browser.
149132
150133## Rest resources
151134
0 commit comments