Skip to content

Commit ee2a2ee

Browse files
committed
Set content encoding header in response to avoid double content encoding in nginx
1 parent d11252c commit ee2a2ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ngx_http_redirectionio_module_filter.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ ngx_int_t ngx_http_redirectionio_headers_filter(ngx_http_request_t *r) {
171171

172172
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http redirectionio add header to response \"%s: %s\"", header_map->name, header_map->value);
173173

174+
if (ngx_strcasecmp((u_char *)header_map->name, (u_char *)"Content-Encoding") == 0) {
175+
r->headers_out.content_encoding = h;
176+
}
177+
174178
header_map = header_map->next;
175179
}
176180

0 commit comments

Comments
 (0)