Skip to content

Commit 6e11f0d

Browse files
committed
add parameter for pcre_jit
1 parent d51a170 commit 6e11f0d

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

manifests/config.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
$worker_connections = $nginx::worker_connections
133133
$worker_processes = $nginx::worker_processes
134134
$worker_rlimit_nofile = $nginx::worker_rlimit_nofile
135+
$pcre_jit = $nginx::pcre_jit
135136
$include_modules_enabled = $nginx::include_modules_enabled
136137

137138
# Non-configurable settings

manifests/init.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@
160160
Enum['on', 'off'] $ssl_prefer_server_ciphers = 'on',
161161
Variant[Integer, Enum['auto']] $worker_processes = 'auto',
162162
Integer $worker_rlimit_nofile = 1024,
163+
Optional[Enum['on', 'off']] $pcre_jit = undef,
163164
String $ssl_protocols = 'TLSv1 TLSv1.1 TLSv1.2',
164165
String $ssl_ciphers = 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS', # lint:ignore:140chars
165166
Optional[Stdlib::Unixpath] $ssl_dhparam = undef,

spec/classes/nginx_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,12 @@
470470
value: 10_000,
471471
match: 'worker_rlimit_nofile 10000;'
472472
},
473+
{
474+
title: 'should set pcre_jit',
475+
attr: 'pcre_jit',
476+
value: 'on',
477+
match: %r{^\s*pcre_jit\s+on;}
478+
},
473479
{
474480
title: 'should set error_log',
475481
attr: 'nginx_error_log',

templates/conf.d/nginx.conf.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ worker_processes <%= @worker_processes %>;
1616
<% if @worker_rlimit_nofile -%>
1717
worker_rlimit_nofile <%= @worker_rlimit_nofile %>;
1818
<% end -%>
19+
<% if @pcre_jit -%>
20+
pcre_jit <%= @pcre_jit %>;
21+
<% end -%>
1922

2023
<% if @pid -%>
2124
pid <%= @pid %>;

0 commit comments

Comments
 (0)