Skip to content

Commit eed01fc

Browse files
committed
Allow to better test nginx module in dev env
1 parent df02e8b commit eed01fc

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

nginx-test.conf.in

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,25 @@ http {
3737
location /noredirection {
3838
redirectionio off;
3939
}
40+
41+
location /nolog {
42+
redirectionio_logs off;
43+
}
44+
}
45+
46+
server {
47+
listen 10081;
48+
root /var/www;
49+
access_log off;
50+
51+
redirectionio on;
52+
redirectionio_project_key 58056a48-664d-11e7-aeb0-0242ac130004;
53+
redirectionio_pass agent:10301;
54+
55+
location / {
56+
proxy_set_header Host $host;
57+
proxy_set_header X-Real-IP $remote_addr;
58+
proxy_pass http://backend;
59+
}
4060
}
4161
}

src/ngx_http_redirectionio_module_filter.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ ngx_int_t ngx_http_redirectionio_headers_filter(ngx_http_request_t *r) {
7373

7474
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http redirectionio start header filter");
7575

76+
// @TODO Handle specific headers
77+
// - Server
78+
// - Content Type / Charset
79+
// - Content Length (too touchy ?)
80+
// - Last modified
81+
// - Location
82+
// -
83+
7684
for (i = 0; /* void */ ; i++) {
7785
if (i >= part->nelts) {
7886
if (part->next == NULL) {

0 commit comments

Comments
 (0)