diff --git a/README b/README index ca26261..d26c879 100644 --- a/README +++ b/README @@ -16,7 +16,7 @@ Currently only inspects the following headers: Range, If-Range, If-Unmodified-Since, If-Modified-Since, Date, Accept-Encoding, Accept-Language, Accept-Charset, Max-Forwards, If-Match, - If-None-Match, Last-Modified, Content-Length + If-None-Match, Last-Modified, Content-Length, Expires Report Bugs Create a ticket on the issue tracking interface of GitHub: diff --git a/ngx_http_header_inspect.c b/ngx_http_header_inspect.c index 731d07b..18b188a 100644 --- a/ngx_http_header_inspect.c +++ b/ngx_http_header_inspect.c @@ -1209,6 +1209,11 @@ if ((rc != NGX_OK) && conf->block) { return NGX_HTTP_BAD_REQUEST; } + } else if ((h[i].key.len == 7) && (ngx_strcmp("Expires", h[i].key.data) == 0) ) { + rc = ngx_header_inspect_date_header(conf, r->connection->log, "Expires", h[i].value); + if ((rc != NGX_OK) && conf->block) { + return NGX_HTTP_BAD_REQUEST; + } } else if ((h[i].key.len == 13) && (ngx_strcmp("Last-Modified", h[i].key.data) == 0) ) { rc = ngx_header_inspect_date_header(conf, r->connection->log, "Last-Modified", h[i].value); if ((rc != NGX_OK) && conf->block) {