Skip to content

Commit

Permalink
Set content encoding header in response to avoid double content encod…
Browse files Browse the repository at this point in the history
…ing in nginx
  • Loading branch information
joelwurtz committed Apr 15, 2021
1 parent d11252c commit ee2a2ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ngx_http_redirectionio_module_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ ngx_int_t ngx_http_redirectionio_headers_filter(ngx_http_request_t *r) {

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);

if (ngx_strcasecmp((u_char *)header_map->name, (u_char *)"Content-Encoding") == 0) {
r->headers_out.content_encoding = h;
}

header_map = header_map->next;
}

Expand Down

0 comments on commit ee2a2ee

Please sign in to comment.