From c1b00de92f036c9e8525108278bbf3671e26ca9e Mon Sep 17 00:00:00 2001 From: Zero King Date: Sat, 18 Oct 2025 20:45:13 +0800 Subject: [PATCH] Fix incorrect context for `gzip_static` directive --- .../directives/nginx/http/gzip/ngx_http_gzip_static_module.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/meanmail/directives/nginx/http/gzip/ngx_http_gzip_static_module.kt b/src/main/kotlin/dev/meanmail/directives/nginx/http/gzip/ngx_http_gzip_static_module.kt index 64efbfd..6a99c6b 100644 --- a/src/main/kotlin/dev/meanmail/directives/nginx/http/gzip/ngx_http_gzip_static_module.kt +++ b/src/main/kotlin/dev/meanmail/directives/nginx/http/gzip/ngx_http_gzip_static_module.kt @@ -4,7 +4,9 @@ import dev.meanmail.directives.Directive import dev.meanmail.directives.DirectiveParameter import dev.meanmail.directives.NginxModule import dev.meanmail.directives.ValueType +import dev.meanmail.directives.nginx.http.http import dev.meanmail.directives.nginx.http.location +import dev.meanmail.directives.nginx.http.server // https://nginx.org/en/docs/http/ngx_http_gzip_static_module.html @@ -17,7 +19,7 @@ val ngx_http_gzip_static_module = NginxModule( val gzipStatic = Directive( name = "gzip_static", description = "Enables serving of pre-compressed .gz files instead of compressing files on-the-fly. Allows efficient delivery of static pre-compressed content.", - context = listOf(location), + context = listOf(http, server, location), module = ngx_http_gzip_static_module, parameters = listOf( DirectiveParameter(