From 4503808a9a1a38a5c1832a40deaefe16ecbebf79 Mon Sep 17 00:00:00 2001 From: marcel2012 <13705842+marcel2012@users.noreply.github.com> Date: Tue, 22 Jul 2025 23:53:40 +0200 Subject: [PATCH 1/2] Change HTTP nginx site links to HTTPS --- NEW_CONTRIBUTOR.md | 8 +- .../nginx-configuration/configmap.md | 6 +- internal/ingress/annotations/authreq/main.go | 2 +- .../ingress/annotations/ratelimit/main.go | 2 +- internal/ingress/controller/config/config.go | 162 +++++++++--------- .../ingress/controller/template/template.go | 4 +- internal/ingress/controller/util.go | 2 +- internal/ingress/defaults/main.go | 52 +++--- internal/nginx/main.go | 2 +- rootfs/etc/nginx/lua/util/split.lua | 2 +- rootfs/etc/nginx/template/nginx.tmpl | 10 +- test/data/cleanConf.expected.conf | 2 +- test/data/cleanConf.src.conf | 2 +- 13 files changed, 128 insertions(+), 128 deletions(-) diff --git a/NEW_CONTRIBUTOR.md b/NEW_CONTRIBUTOR.md index c9668430c3..94ba91dfc2 100644 --- a/NEW_CONTRIBUTOR.md +++ b/NEW_CONTRIBUTOR.md @@ -111,9 +111,9 @@ font-family: Tahoma, Verdana, Arial, sans-serif; } working. Further configuration is required.

For online documentation and support please refer to -nginx.org.
+nginx.org.
Commercial support is available at -nginx.com.

+nginx.com.

Thank you for using nginx.

@@ -404,9 +404,9 @@ font-family: Tahoma, Verdana, Arial, sans-serif; } working. Further configuration is required.

For online documentation and support please refer to -nginx.org.
+nginx.org.
Commercial support is available at -nginx.com.

+nginx.com.

Thank you for using nginx.

diff --git a/docs/user-guide/nginx-configuration/configmap.md b/docs/user-guide/nginx-configuration/configmap.md index 87f6827861..e0bcea0bfc 100644 --- a/docs/user-guide/nginx-configuration/configmap.md +++ b/docs/user-guide/nginx-configuration/configmap.md @@ -755,7 +755,7 @@ Enables or disables [HTTP/2](https://nginx.org/en/docs/http/ngx_http_v2_module.h ## gzip-disable -Disables [gzipping](http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_disable) of responses for requests with "User-Agent" header fields matching any of the specified regular expressions. +Disables [gzipping](https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_disable) of responses for requests with "User-Agent" header fields matching any of the specified regular expressions. ## gzip-level @@ -835,7 +835,7 @@ Sets the maximum time during which requests can be processed through one keepali _**default:**_ "1h" _References:_ -[http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_time](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_time) +[https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_time](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_time) ## upstream-keepalive-timeout @@ -1368,7 +1368,7 @@ Enables debugging log for selected client connections. _**default:**_ "" _References:_ -[http://nginx.org/en/docs/ngx_core_module.html#debug_connection](http://nginx.org/en/docs/ngx_core_module.html#debug_connection) +[https://nginx.org/en/docs/ngx_core_module.html#debug_connection](https://nginx.org/en/docs/ngx_core_module.html#debug_connection) ## strict-validate-path-type diff --git a/internal/ingress/annotations/authreq/main.go b/internal/ingress/annotations/authreq/main.go index ad38c36b12..b4e16c0607 100644 --- a/internal/ingress/annotations/authreq/main.go +++ b/internal/ingress/annotations/authreq/main.go @@ -250,7 +250,7 @@ var ( methodsRegex = regexp.MustCompile("(GET|HEAD|POST|PUT|PATCH|DELETE|CONNECT|OPTIONS|TRACE)") headerRegexp = regexp.MustCompile(`^[a-zA-Z\d\-_]+$`) statusCodeRegex = regexp.MustCompile(`^\d{3}$`) - durationRegex = regexp.MustCompile(`^\d+(ms|s|m|h|d|w|M|y)$`) // see http://nginx.org/en/docs/syntax.html + durationRegex = regexp.MustCompile(`^\d+(ms|s|m|h|d|w|M|y)$`) // see https://nginx.org/en/docs/syntax.html ) // ValidMethod checks is the provided string a valid HTTP method diff --git a/internal/ingress/annotations/ratelimit/main.go b/internal/ingress/annotations/ratelimit/main.go index e79c698bf2..7a38a02dd0 100644 --- a/internal/ingress/annotations/ratelimit/main.go +++ b/internal/ingress/annotations/ratelimit/main.go @@ -99,7 +99,7 @@ func (rt1 *Config) Equal(rt2 *Config) bool { } // Zone returns information about the NGINX rate limit (limit_req_zone) -// http://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_zone +// https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_zone type Zone struct { Name string `json:"name"` Limit int `json:"limit"` diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index 1dbef14250..1778a943a1 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -32,11 +32,11 @@ import ( var EnableSSLChainCompletion = false const ( - // http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size + // https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size // Sets the maximum allowed size of the client request body bodySize = "1m" - // http://nginx.org/en/docs/ngx_core_module.html#error_log + // https://nginx.org/en/docs/ngx_core_module.html#error_log // Configures logging level [debug | info | notice | warn | error | crit | alert | emerg] // Log levels above are listed in the order of increasing severity errorLevel = "notice" @@ -55,34 +55,34 @@ const ( logFormatStream = `[$remote_addr] [$time_local] $protocol $status $bytes_sent $bytes_received $session_time` - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size // Sets the size of the buffer used for sending data. // 4k helps NGINX to improve TLS Time To First Byte (TTTFB) // https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/ sslBufferSize = "4k" // Enabled ciphers list to enabled. The ciphers are specified in the format understood by the OpenSSL library - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers sslCiphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384" // SSL enabled protocols to use - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols sslProtocols = "TLSv1.2 TLSv1.3" // Disable TLS 1.3 early data - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data sslEarlyData = false // Time during which a client may reuse the session parameters stored in a cache. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_timeout + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_timeout sslSessionTimeout = "10m" // Size of the SSL shared cache between all worker processes. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache sslSessionCacheSize = "10m" // Parameters for a shared memory zone that will keep states for various keys. - // http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_zone + // https://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_zone defaultLimitConnZoneVariable = "$binary_remote_addr" ) @@ -113,12 +113,12 @@ type Configuration struct { // AllowBackendServerHeader enables the return of the header Server from the backend // instead of the generic nginx string. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header // By default this is disabled AllowBackendServerHeader bool `json:"allow-backend-server-header"` // AccessLogParams sets additional params for access_log - // http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log + // https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log // By default it's empty AccessLogParams string `json:"access-log-params,omitempty"` @@ -131,25 +131,25 @@ type Configuration struct { EnableAuthAccessLog bool `json:"enable-auth-access-log"` // AccessLogPath sets the path of the access logs for both http and stream contexts if enabled - // http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log - // http://nginx.org/en/docs/stream/ngx_stream_log_module.html#access_log + // https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log + // https://nginx.org/en/docs/stream/ngx_stream_log_module.html#access_log // By default access logs go to /var/log/nginx/access.log AccessLogPath string `json:"access-log-path,omitempty"` // HTTPAccessLogPath sets the path of the access logs for http context globally if enabled - // http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log + // https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log HTTPAccessLogPath string `json:"http-access-log-path,omitempty"` // StreamAccessLogPath sets the path of the access logs for stream context globally if enabled - // http://nginx.org/en/docs/stream/ngx_stream_log_module.html#access_log + // https://nginx.org/en/docs/stream/ngx_stream_log_module.html#access_log StreamAccessLogPath string `json:"stream-access-log-path,omitempty"` // WorkerCPUAffinity bind nginx worker processes to CPUs this will improve response latency - // http://nginx.org/en/docs/ngx_core_module.html#worker_cpu_affinity + // https://nginx.org/en/docs/ngx_core_module.html#worker_cpu_affinity // By default this is disabled WorkerCPUAffinity string `json:"worker-cpu-affinity,omitempty"` // ErrorLogPath sets the path of the error logs - // http://nginx.org/en/docs/ngx_core_module.html#error_log + // https://nginx.org/en/docs/ngx_core_module.html#error_log // By default error logs go to /var/log/nginx/error.log ErrorLogPath string `json:"error-log-path,omitempty"` @@ -170,32 +170,32 @@ type Configuration struct { // ClientHeaderBufferSize allows to configure a custom buffer // size for reading client request header - // http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size + // https://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size ClientHeaderBufferSize string `json:"client-header-buffer-size"` // Defines a timeout for reading client request header, in seconds - // http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_timeout + // https://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_timeout ClientHeaderTimeout int `json:"client-header-timeout,omitempty"` // Sets buffer size for reading client request body - // http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size + // https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size ClientBodyBufferSize string `json:"client-body-buffer-size,omitempty"` // Defines a timeout for reading client request body, in seconds - // http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout + // https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout ClientBodyTimeout int `json:"client-body-timeout,omitempty"` // DisableAccessLog disables the Access Log globally for both HTTP and Stream contexts from NGINX ingress controller - // http://nginx.org/en/docs/http/ngx_http_log_module.html - // http://nginx.org/en/docs/stream/ngx_stream_log_module.html + // https://nginx.org/en/docs/http/ngx_http_log_module.html + // https://nginx.org/en/docs/stream/ngx_stream_log_module.html DisableAccessLog bool `json:"disable-access-log,omitempty"` // DisableHTTPAccessLog disables the Access Log for http context globally from NGINX ingress controller - // http://nginx.org/en/docs/http/ngx_http_log_module.html + // https://nginx.org/en/docs/http/ngx_http_log_module.html DisableHTTPAccessLog bool `json:"disable-http-access-log,omitempty"` // DisableStreamAccessLog disables the Access Log for stream context globally from NGINX ingress controller - // http://nginx.org/en/docs/stream/ngx_stream_log_module.html + // https://nginx.org/en/docs/stream/ngx_stream_log_module.html DisableStreamAccessLog bool `json:"disable-stream-access-log,omitempty"` // DisableIpv6DNS disables IPv6 for nginx resolver @@ -205,12 +205,12 @@ type Configuration struct { DisableIpv6 bool `json:"disable-ipv6,omitempty"` // EnableUnderscoresInHeaders enables underscores in header names - // http://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers + // https://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers // By default this is disabled EnableUnderscoresInHeaders bool `json:"enable-underscores-in-headers"` // IgnoreInvalidHeaders set if header fields with invalid names should be ignored - // http://nginx.org/en/docs/http/ngx_http_core_module.html#ignore_invalid_headers + // https://nginx.org/en/docs/http/ngx_http_core_module.html#ignore_invalid_headers // By default this is enabled IgnoreInvalidHeaders bool `json:"ignore-invalid-headers"` @@ -218,7 +218,7 @@ type Configuration struct { // in case of an error. The previous behavior can be restored using the value true RetryNonIdempotent bool `json:"retry-non-idempotent"` - // http://nginx.org/en/docs/ngx_core_module.html#error_log + // https://nginx.org/en/docs/ngx_core_module.html#error_log // Configures logging level [debug | info | notice | warn | error | crit | alert | emerg] // Log levels above are listed in the order of increasing severity ErrorLogLevel string `json:"error-log-level,omitempty"` @@ -233,14 +233,14 @@ type Configuration struct { // Deprecated: HTTP2MaxHeaderSize is deprecated. HTTP2MaxHeaderSize string `json:"http2-max-header-size,omitempty"` - // http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_requests + // https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_requests // HTTP2MaxRequests Sets the maximum number of requests (including push requests) that can be served // through one HTTP/2 connection, after which the next client request will lead to connection closing // and the need of establishing a new connection. // Deprecated: HTTP2MaxRequests is deprecated. HTTP2MaxRequests int `json:"http2-max-requests,omitempty"` - // http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_concurrent_streams + // https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_concurrent_streams // Sets the maximum number of concurrent HTTP/2 streams in a connection. HTTP2MaxConcurrentStreams int `json:"http2-max-concurrent-streams,omitempty"` @@ -263,52 +263,52 @@ type Configuration struct { // Time during which a keep-alive client connection will stay open on the server side. // The zero value disables keep-alive client connections - // http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout + // https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout KeepAlive int `json:"keep-alive,omitempty"` // Sets the maximum number of requests that can be served through one keep-alive connection. - // http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests + // https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests KeepAliveRequests int `json:"keep-alive-requests,omitempty"` // LargeClientHeaderBuffers Sets the maximum number and size of buffers used for reading // large client request header. - // http://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers + // https://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers // Default: 4 8k LargeClientHeaderBuffers string `json:"large-client-header-buffers"` // Disable all escaping - // http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format + // https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format LogFormatEscapeNone bool `json:"log-format-escape-none,omitempty"` // Enable json escaping - // http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format + // https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format LogFormatEscapeJSON bool `json:"log-format-escape-json,omitempty"` // Customize upstream log_format - // http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format + // https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format LogFormatUpstream string `json:"log-format-upstream,omitempty"` // Customize stream log_format - // http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format + // https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format LogFormatStream string `json:"log-format-stream,omitempty"` // If disabled, a worker process will accept one new connection at a time. // Otherwise, a worker process will accept all new connections at a time. - // http://nginx.org/en/docs/ngx_core_module.html#multi_accept + // https://nginx.org/en/docs/ngx_core_module.html#multi_accept // Default: true EnableMultiAccept bool `json:"enable-multi-accept,omitempty"` // Maximum number of simultaneous connections that can be opened by each worker process - // http://nginx.org/en/docs/ngx_core_module.html#worker_connections + // https://nginx.org/en/docs/ngx_core_module.html#worker_connections MaxWorkerConnections int `json:"max-worker-connections,omitempty"` // Maximum number of files that can be opened by each worker process. - // http://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_nofile + // https://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_nofile MaxWorkerOpenFiles int `json:"max-worker-open-files,omitempty"` // Sets the bucket size for the map variables hash tables. // Default value depends on the processor’s cache line size. - // http://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_bucket_size + // https://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_bucket_size MapHashBucketSize int `json:"map-hash-bucket-size,omitempty"` // NginxStatusIpv4Whitelist has the list of cidr that are allowed to access @@ -325,76 +325,76 @@ type Configuration struct { // Maximum size of the server names hash tables used in server names, map directive’s values, // MIME types, names of request header strings, etcd. - // http://nginx.org/en/docs/hash.html - // http://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_max_size + // https://nginx.org/en/docs/hash.html + // https://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_max_size ServerNameHashMaxSize int `json:"server-name-hash-max-size,omitempty"` // Size of the bucket for the server names hash tables - // http://nginx.org/en/docs/hash.html - // http://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_bucket_size + // https://nginx.org/en/docs/hash.html + // https://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_bucket_size ServerNameHashBucketSize int `json:"server-name-hash-bucket-size,omitempty"` // Size of the bucket for the proxy headers hash tables - // http://nginx.org/en/docs/hash.html + // https://nginx.org/en/docs/hash.html // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_headers_hash_max_size ProxyHeadersHashMaxSize int `json:"proxy-headers-hash-max-size,omitempty"` // Maximum size of the bucket for the proxy headers hash tables - // http://nginx.org/en/docs/hash.html + // https://nginx.org/en/docs/hash.html // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_headers_hash_bucket_size ProxyHeadersHashBucketSize int `json:"proxy-headers-hash-bucket-size,omitempty"` // Enables or disables emitting nginx version in error messages and in the “Server” response header field. - // http://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens + // https://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens // Default: false ShowServerTokens bool `json:"server-tokens"` // Enabled ciphers list to enabled. The ciphers are specified in the format understood by // the OpenSSL library - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers SSLCiphers string `json:"ssl-ciphers,omitempty"` // Specifies a curve for ECDHE ciphers. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ecdh_curve + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ecdh_curve SSLECDHCurve string `json:"ssl-ecdh-curve,omitempty"` // The secret that contains Diffie-Hellman key to help with "Perfect Forward Secrecy" // https://wiki.openssl.org/index.php/Diffie-Hellman_parameters // https://wiki.mozilla.org/Security/Server_Side_TLS#DHE_handshake_and_dhparam - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_dhparam + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_dhparam SSLDHParam string `json:"ssl-dh-param,omitempty"` // SSL enabled protocols to use - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols SSLProtocols string `json:"ssl-protocols,omitempty"` // Enables or disable TLS 1.3 early data. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_early_data SSLEarlyData bool `json:"ssl-early-data,omitempty"` // Enables or disables the use of shared SSL cache among worker processes. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache SSLSessionCache bool `json:"ssl-session-cache,omitempty"` // Size of the SSL shared cache between all worker processes. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache SSLSessionCacheSize string `json:"ssl-session-cache-size,omitempty"` // Enables or disables session resumption through TLS session tickets. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_tickets + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_tickets SSLSessionTickets bool `json:"ssl-session-tickets,omitempty"` // Sets the secret key used to encrypt and decrypt TLS session tickets. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_tickets + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_tickets // By default, a randomly generated key is used. // Example: openssl rand 80 | openssl enc -A -base64 SSLSessionTicketKey string `json:"ssl-session-ticket-key,omitempty"` // Time during which a client may reuse the session parameters stored in a cache. - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_timeout + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_timeout SSLSessionTimeout string `json:"ssl-session-timeout,omitempty"` - // http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size + // https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size // Sets the size of the buffer used for sending data. // 4k helps NGINX to improve TLS Time To First Byte (TTTFB) // https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/ @@ -421,7 +421,7 @@ type Configuration struct { EnableAioWrite bool `json:"enable-aio-write,omitempty"` // Enables or disables the use of the nginx module that compresses responses using the "gzip" method - // http://nginx.org/en/docs/http/ngx_http_gzip_module.html + // https://nginx.org/en/docs/http/ngx_http_gzip_module.html UseGzip bool `json:"use-gzip,omitempty"` // UseGeoIP2 enables the geoip2 module for NGINX @@ -446,13 +446,13 @@ type Configuration struct { BrotliTypes string `json:"brotli-types,omitempty"` // Enables or disables the HTTP/2 support in secure connections - // http://nginx.org/en/docs/http/ngx_http_v2_module.html + // https://nginx.org/en/docs/http/ngx_http_v2_module.html // Default: true UseHTTP2 bool `json:"use-http2,omitempty"` // Disables gzipping of responses for requests with "User-Agent" header fields matching any of // the specified regular expressions. - // http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_disable + // https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_disable GzipDisable string `json:"gzip-disable,omitempty"` // gzip Compression Level that will be used @@ -467,33 +467,33 @@ type Configuration struct { GzipTypes string `json:"gzip-types,omitempty"` // Defines the number of worker processes. By default auto means number of available CPU cores - // http://nginx.org/en/docs/ngx_core_module.html#worker_processes + // https://nginx.org/en/docs/ngx_core_module.html#worker_processes WorkerProcesses string `json:"worker-processes,omitempty"` // Defines whether multiple concurrent reloads of worker processes should occur. // Set this to false to prevent more than n x 2 workers to exist at any time, to avoid potential OOM situations and high CPU load // With this setting on false, configuration changes in the queue will be re-queued with an exponential backoff, until the number of worker process is the expected value. // By default new worker processes are spawned every time there's a change that cannot be applied dynamically with no upper limit to the number of running workers - // http://nginx.org/en/docs/ngx_core_module.html#worker_processes + // https://nginx.org/en/docs/ngx_core_module.html#worker_processes WorkerSerialReloads bool `json:"enable-serial-reloads,omitempty"` // Defines a timeout for a graceful shutdown of worker processes - // http://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout + // https://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout WorkerShutdownTimeout string `json:"worker-shutdown-timeout,omitempty"` // Sets the bucket size for the variables hash table. - // http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size + // https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size VariablesHashBucketSize int `json:"variables-hash-bucket-size,omitempty"` // Sets the maximum size of the variables hash table. - // http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size + // https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size VariablesHashMaxSize int `json:"variables-hash-max-size,omitempty"` // Activates the cache for connections to upstream servers. // The connections parameter sets the maximum number of idle keepalive connections to // upstream servers that are preserved in the cache of each worker process. When this // number is exceeded, the least recently used connections are closed. - // http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive + // https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive UpstreamKeepaliveConnections int `json:"upstream-keepalive-connections,omitempty"` // Sets the maximum time during which requests can be processed through one keepalive connection @@ -501,46 +501,46 @@ type Configuration struct { UpstreamKeepaliveTime string `json:"upstream-keepalive-time,omitempty"` // Sets a timeout during which an idle keepalive connection to an upstream server will stay open. - // http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_timeout + // https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_timeout UpstreamKeepaliveTimeout int `json:"upstream-keepalive-timeout,omitempty"` // Sets the maximum number of requests that can be served through one keepalive connection. // After the maximum number of requests is made, the connection is closed. - // http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_requests + // https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_requests UpstreamKeepaliveRequests int `json:"upstream-keepalive-requests,omitempty"` // Sets the maximum size of the variables hash table. - // http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size + // https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size LimitConnZoneVariable string `json:"limit-conn-zone-variable,omitempty"` // Sets the timeout between two successive read or write operations on client or proxied server connections. // If no data is transmitted within this time, the connection is closed. - // http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_timeout + // https://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_timeout ProxyStreamTimeout string `json:"proxy-stream-timeout,omitempty"` // When a connection to the proxied server cannot be established, determines whether // a client connection will be passed to the next server. - // http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_next_upstream + // https://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_next_upstream ProxyStreamNextUpstream bool `json:"proxy-stream-next-upstream,omitempty"` // Limits the time allowed to pass a connection to the next server. // The 0 value turns off this limitation. - // http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_next_upstream_timeout + // https://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_next_upstream_timeout ProxyStreamNextUpstreamTimeout string `json:"proxy-stream-next-upstream-timeout,omitempty"` // Limits the number of possible tries a request should be passed to the next server. // The 0 value turns off this limitation. - // http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_next_upstream_tries + // https://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_next_upstream_tries ProxyStreamNextUpstreamTries int `json:"proxy-stream-next-upstream-tries,omitempty"` // Sets the number of datagrams expected from the proxied server in response // to the client request if the UDP protocol is used. - // http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_responses + // https://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_responses // Default: 1 ProxyStreamResponses int `json:"proxy-stream-responses,omitempty"` // Modifies the HTTP version the proxy uses to interact with the backend. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version ProxyHTTPVersion string `json:"proxy-http-version"` // Disables NGINX proxy-intercept-errors when error_page/custom-http-errors are set @@ -672,12 +672,12 @@ type Configuration struct { HideHeaders []string `json:"hide-headers"` // LimitReqStatusCode Sets the status code to return in response to rejected requests. - // http://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_status + // https://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_status // Default: 503 LimitReqStatusCode int `json:"limit-req-status-code"` // LimitConnStatusCode Sets the status code to return in response to rejected connections. - // http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_status + // https://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_status // Default: 503 LimitConnStatusCode int `json:"limit-conn-status-code"` @@ -726,12 +726,12 @@ type Configuration struct { ProxySSLLocationOnly bool `json:"proxy-ssl-location-only"` // DefaultType Sets the default MIME type of a response. - // http://nginx.org/en/docs/http/ngx_http_core_module.html#default_type + // https://nginx.org/en/docs/http/ngx_http_core_module.html#default_type // Default: text/html DefaultType string `json:"default-type"` // DebugConnections Enables debugging log for selected client connections - // http://nginx.org/en/docs/ngx_core_module.html#debug_connection + // https://nginx.org/en/docs/ngx_core_module.html#debug_connection // Default: "" DebugConnections []string `json:"debug-connections"` diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go index 8bd2d32167..873248bb22 100644 --- a/internal/ingress/controller/template/template.go +++ b/internal/ingress/controller/template/template.go @@ -993,7 +993,7 @@ func buildNextUpstream(i, r interface{}) string { return strings.Join(nextUpstreamCodes, " ") } -// refer to http://nginx.org/en/docs/syntax.html +// refer to https://nginx.org/en/docs/syntax.html // Nginx differentiates between size and offset // offset directives support gigabytes in addition var ( @@ -1002,7 +1002,7 @@ var ( ) // isValidByteSize validates size units valid in nginx -// http://nginx.org/en/docs/syntax.html +// https://nginx.org/en/docs/syntax.html func isValidByteSize(input interface{}, isOffset bool) bool { s, ok := input.(string) if !ok { diff --git a/internal/ingress/controller/util.go b/internal/ingress/controller/util.go index 975fb822ae..31f4fd97e3 100644 --- a/internal/ingress/controller/util.go +++ b/internal/ingress/controller/util.go @@ -75,7 +75,7 @@ func upstreamServiceNameAndPort(service *networking.IngressServiceBackend) (stri // sysctlSomaxconn returns the maximum number of connections that can be queued // for acceptance (value of net.core.somaxconn) -// http://nginx.org/en/docs/http/ngx_http_core_module.html#listen +// https://nginx.org/en/docs/http/ngx_http_core_module.html#listen func sysctlSomaxconn() int { maxConns, err := getSysctl("net/core/somaxconn") if err != nil || maxConns < 512 { diff --git a/internal/ingress/defaults/main.go b/internal/ingress/defaults/main.go index 4ee3d8e525..bb62dd180d 100644 --- a/internal/ingress/defaults/main.go +++ b/internal/ingress/defaults/main.go @@ -26,8 +26,8 @@ type Backend struct { AppRoot string `json:"app-root"` // enables which HTTP codes should be passed for processing with the error_page directive - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors - // http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors + // https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page // By default this is disabled CustomHTTPErrors []int `json:"custom-http-errors"` @@ -37,59 +37,59 @@ type Backend struct { // allows usage of CustomHTTPErrors without intercepting service errors // e.g. custom 404 and 503 when service-a does not exist or is not available // but service-a can return 404 and 503 error codes without intercept - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors // By default this is false DisableProxyInterceptErrors bool `json:"disable-proxy-intercept-errors"` - // http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size + // https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size // Sets the maximum allowed size of the client request body ProxyBodySize string `json:"proxy-body-size"` // Defines a timeout for establishing a connection with a proxied server. // It should be noted that this timeout cannot usually exceed 75 seconds. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout ProxyConnectTimeout int `json:"proxy-connect-timeout"` // Timeout in seconds for reading a response from the proxied server. The timeout is set only between // two successive read operations, not for the transmission of the whole response - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout ProxyReadTimeout int `json:"proxy-read-timeout"` // Timeout in seconds for transmitting a request to the proxied server. The timeout is set only between // two successive write operations, not for the transmission of the whole request. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_send_timeout + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_send_timeout ProxySendTimeout int `json:"proxy-send-timeout"` // Sets the number of the buffers used for reading a response from the proxied server - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers ProxyBuffersNumber int `json:"proxy-buffers-number"` // Sets the size of the buffer used for reading the first part of the response received from the // proxied server. This part usually contains a small response header. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size) + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size) ProxyBufferSize string `json:"proxy-buffer-size"` // Limits the total size of buffers that can be busy sending a response to the client while // the response is not yet fully read. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_busy_buffers_size + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_busy_buffers_size ProxyBusyBuffersSize string `json:"proxy-busy-buffers-size"` // Sets a text that should be changed in the path attribute of the “Set-Cookie” header fields of // a proxied server response. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_path + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_path ProxyCookiePath string `json:"proxy-cookie-path"` // Sets a text that should be changed in the domain attribute of the “Set-Cookie” header fields // of a proxied server response. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_domain + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_domain ProxyCookieDomain string `json:"proxy-cookie-domain"` // Specifies in which cases a request should be passed to the next server. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream ProxyNextUpstream string `json:"proxy-next-upstream"` // Limits the time during which a request can be passed to the next server. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream_timeout + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream_timeout ProxyNextUpstreamTimeout int `json:"proxy-next-upstream-timeout"` // Limits the number of possible tries for passing a request to the next server. @@ -97,17 +97,17 @@ type Backend struct { ProxyNextUpstreamTries int `json:"proxy-next-upstream-tries"` // Sets the original text that should be changed in the "Location" and "Refresh" header fields of a proxied server response. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect // Default: off ProxyRedirectFrom string `json:"proxy-redirect-from"` // Sets the replacement text that should be changed in the "Location" and "Refresh" header fields of a proxied server response. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect // Default: off ProxyRedirectTo string `json:"proxy-redirect-to"` // Enables or disables buffering of a client request body. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_buffering + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_buffering ProxyRequestBuffering string `json:"proxy-request-buffering"` // Name server/s used to resolve names of upstream servers into IP addresses. @@ -131,14 +131,14 @@ type Backend struct { UsePortInRedirects bool `json:"use-port-in-redirects"` // Enables or disables relative redirects. By default nginx uses absolute redirects. - // http://nginx.org/en/docs/http/ngx_http_core_module.html#absolute_redirect + // https://nginx.org/en/docs/http/ngx_http_core_module.html#absolute_redirect // Default: false RelativeRedirects bool `json:"relative-redirects"` // Enable stickiness by client-server mapping based on a NGINX variable, text or a combination of both. // A consistent hashing method will be used which ensures only a few keys would be remapped to different // servers on upstream group changes - // http://nginx.org/en/docs/http/ngx_http_upstream_module.html#hash + // https://nginx.org/en/docs/http/ngx_http_upstream_module.html#hash UpstreamHashBy string `json:"upstream-hash-by"` // Consistent hashing subset flag. @@ -153,34 +153,34 @@ type Backend struct { LoadBalancing string `json:"load-balance"` // WhitelistSourceRange allows limiting access to certain client addresses - // http://nginx.org/en/docs/http/ngx_http_access_module.html + // https://nginx.org/en/docs/http/ngx_http_access_module.html WhitelistSourceRange []string `json:"whitelist-source-range"` // DenylistSourceRange allows limiting access to certain client addresses - // http://nginx.org/en/docs/http/ngx_http_access_module.html + // https://nginx.org/en/docs/http/ngx_http_access_module.html DenylistSourceRange []string `json:"denylist-source-range"` // Limits the rate of response transmission to a client. // The rate is specified in bytes per second. The zero value disables rate limiting. // The limit is set per a request, and so if a client simultaneously opens two connections, // the overall rate will be twice as much as the specified limit. - // http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate + // https://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate LimitRate int `json:"limit-rate"` // Sets the initial amount after which the further transmission of a response to a client will be rate limited. - // http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate_after + // https://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate_after LimitRateAfter int `json:"limit-rate-after"` // Enables or disables buffering of responses from the proxied server. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering ProxyBuffering string `json:"proxy-buffering"` // Modifies the HTTP version the proxy uses to interact with the backend. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version ProxyHTTPVersion string `json:"proxy-http-version"` // Sets the maximum temp file size when proxy-buffers capacity is exceeded. - // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_max_temp_file_size + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_max_temp_file_size ProxyMaxTempFileSize string `json:"proxy-max-temp-file-size"` // By default, the NGINX ingress controller uses a list of all endpoints (Pod IP/port) in the NGINX upstream configuration. diff --git a/internal/nginx/main.go b/internal/nginx/main.go index fc586e9e83..18ee5ecd1c 100644 --- a/internal/nginx/main.go +++ b/internal/nginx/main.go @@ -55,7 +55,7 @@ var HealthPath = "/healthz" var HealthCheckTimeout = 10 * time.Second // StatusPath defines the path used to expose the NGINX status page -// http://nginx.org/en/docs/http/ngx_http_stub_status_module.html +// https://nginx.org/en/docs/http/ngx_http_stub_status_module.html var StatusPath = "/nginx_status" // StreamPort defines the port used by NGINX for the NGINX stream configuration socket diff --git a/rootfs/etc/nginx/lua/util/split.lua b/rootfs/etc/nginx/lua/util/split.lua index 63edf0900b..3735b64ab5 100644 --- a/rootfs/etc/nginx/lua/util/split.lua +++ b/rootfs/etc/nginx/lua/util/split.lua @@ -24,7 +24,7 @@ function _M.get_last_value(var) return t[#t] end --- http://nginx.org/en/docs/http/ngx_http_upstream_module.html#example +-- https://nginx.org/en/docs/http/ngx_http_upstream_module.html#example -- CAVEAT: nginx is giving out : instead of , so the docs are wrong -- 127.0.0.1:26157 : 127.0.0.1:26157 , ngx.var.upstream_addr -- 200 : 200 , ngx.var.upstream_status diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 965804a718..c618bd2d4f 100644 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -42,7 +42,7 @@ worker_cpu_affinity {{ $cfg.WorkerCPUAffinity }}; worker_rlimit_nofile {{ $cfg.MaxWorkerOpenFiles }}; -{{/* http://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout */}} +{{/* https://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout */}} {{/* avoid waiting too long during a reload */}} worker_shutdown_timeout {{ $cfg.WorkerShutdownTimeout }} ; @@ -351,7 +351,7 @@ http { log_format upstreaminfo {{ if $cfg.LogFormatEscapeNone }}escape=none {{ else if $cfg.LogFormatEscapeJSON }}escape=json {{ end }}'{{ $cfg.LogFormatUpstream }}'; {{/* map urls that should not appear in access.log */}} - {{/* http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log */}} + {{/* https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log */}} map $request_uri $loggable { {{ range $reqUri := $cfg.SkipAccessLogURLs }} {{ $reqUri }} 0;{{ end }} @@ -380,7 +380,7 @@ http { map $http_upgrade $connection_upgrade { default upgrade; {{ if (gt $cfg.UpstreamKeepaliveConnections 0) }} - # See http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive + # See https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive '' ''; {{ else }} '' close; @@ -480,7 +480,7 @@ http { {{ end }} {{ if not (empty $cfg.SSLDHParam) }} - # allow custom DH file http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_dhparam + # allow custom DH file https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_dhparam ssl_dhparam {{ $cfg.SSLDHParam }}; {{ end }} @@ -1113,7 +1113,7 @@ stream { # The target is an upstream with HTTP keepalive, that is why the # Connection header is cleared and the HTTP version is set to 1.1 as # the Nginx documentation suggests: - # http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive + # https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive proxy_http_version 1.1; proxy_set_header Connection ""; set $target {{ changeHostPort $externalAuth.URL $authUpstreamName }}; diff --git a/test/data/cleanConf.expected.conf b/test/data/cleanConf.expected.conf index 9c0513b37d..7ad94110ff 100644 --- a/test/data/cleanConf.expected.conf +++ b/test/data/cleanConf.expected.conf @@ -84,7 +84,7 @@ http { map $http_upgrade $connection_upgrade { default upgrade; - # See http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive + # See https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive '' ''; } diff --git a/test/data/cleanConf.src.conf b/test/data/cleanConf.src.conf index 6da578106a..e13a2b2667 100644 --- a/test/data/cleanConf.src.conf +++ b/test/data/cleanConf.src.conf @@ -113,7 +113,7 @@ lua_shared_dict ocsp_response_cache 5M; map $http_upgrade $connection_upgrade { default upgrade; - # See http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive + # See https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive '' ''; } From 672c7e0f86f55ebc42c986e87fda597087fc33fa Mon Sep 17 00:00:00 2001 From: marcel2012 <13705842+marcel2012@users.noreply.github.com> Date: Wed, 23 Jul 2025 00:41:42 +0200 Subject: [PATCH 2/2] Fix link hashes, brackets --- docs/user-guide/nginx-configuration/configmap.md | 4 ++-- internal/ingress/controller/config/config.go | 6 +++--- internal/ingress/defaults/main.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/user-guide/nginx-configuration/configmap.md b/docs/user-guide/nginx-configuration/configmap.md index e0bcea0bfc..57d92b0dcb 100644 --- a/docs/user-guide/nginx-configuration/configmap.md +++ b/docs/user-guide/nginx-configuration/configmap.md @@ -809,14 +809,14 @@ _References:_ Sets the bucket size for the variables hash table. _References:_ -[https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size](https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size) +[https://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_bucket_size](https://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_bucket_size) ## variables-hash-max-size Sets the maximum size of the variables hash table. _References:_ -[https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size](https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size) +[https://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_max_size](https://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_max_size) ## upstream-keepalive-connections diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index 1778a943a1..15adaab026 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -482,11 +482,11 @@ type Configuration struct { WorkerShutdownTimeout string `json:"worker-shutdown-timeout,omitempty"` // Sets the bucket size for the variables hash table. - // https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size + // https://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_bucket_size VariablesHashBucketSize int `json:"variables-hash-bucket-size,omitempty"` // Sets the maximum size of the variables hash table. - // https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size + // https://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_max_size VariablesHashMaxSize int `json:"variables-hash-max-size,omitempty"` // Activates the cache for connections to upstream servers. @@ -510,7 +510,7 @@ type Configuration struct { UpstreamKeepaliveRequests int `json:"upstream-keepalive-requests,omitempty"` // Sets the maximum size of the variables hash table. - // https://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_max_size + // https://nginx.org/en/docs/http/ngx_http_map_module.html#map_hash_max_size LimitConnZoneVariable string `json:"limit-conn-zone-variable,omitempty"` // Sets the timeout between two successive read or write operations on client or proxied server connections. diff --git a/internal/ingress/defaults/main.go b/internal/ingress/defaults/main.go index bb62dd180d..abca0ea9e9 100644 --- a/internal/ingress/defaults/main.go +++ b/internal/ingress/defaults/main.go @@ -66,7 +66,7 @@ type Backend struct { // Sets the size of the buffer used for reading the first part of the response received from the // proxied server. This part usually contains a small response header. - // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size) + // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size ProxyBufferSize string `json:"proxy-buffer-size"` // Limits the total size of buffers that can be busy sending a response to the client while