update
This commit is contained in:
parent
a2929be104
commit
c50569d73e
8 changed files with 59 additions and 13 deletions
|
|
@ -46,6 +46,25 @@ $optionalSnippetConfig = @(
|
|||
|
||||
$optionalSnippetConfigShell = $optionalSnippetConfig -replace "`n", "\\n"
|
||||
|
||||
$modernHttp2Config = @(
|
||||
"events {}"
|
||||
""
|
||||
"http {"
|
||||
" include /etc/nginx/mime.types;"
|
||||
" default_type application/octet-stream;"
|
||||
""
|
||||
" server {"
|
||||
" include /etc/nginx/kit/listen/http.conf;"
|
||||
" include /etc/nginx/kit/listen/https.conf;"
|
||||
" include /etc/nginx/kit/listen/http2.conf;"
|
||||
" include /etc/nginx/snippets/cert/mydomain.com.conf;"
|
||||
" server_name modern.example.com;"
|
||||
" }"
|
||||
"}"
|
||||
) -join "\n"
|
||||
|
||||
$modernHttp2ConfigShell = $modernHttp2Config -replace "`n", "\\n"
|
||||
|
||||
$containerCommand = @(
|
||||
"set -eu"
|
||||
"apk add --no-cache openssl >/dev/null"
|
||||
|
|
@ -60,12 +79,15 @@ $containerCommand = @(
|
|||
"cp /etc/nginx/kit/examples/reverse-proxy.nginx.conf /tmp/nginx-kit/examples/reverse-proxy.nginx.conf"
|
||||
"printf '%b' '$serverSnippetConfigShell' > /tmp/nginx-kit/server-snippet.nginx.conf"
|
||||
"printf '%b' '$optionalSnippetConfigShell' > /tmp/nginx-kit/optional-snippets.nginx.conf"
|
||||
"printf '%b' '$modernHttp2ConfigShell' > /tmp/nginx-kit/modern-http2.nginx.conf"
|
||||
"echo 'Validating examples/example.com.conf'"
|
||||
"nginx -t -c /tmp/nginx-kit/server-snippet.nginx.conf"
|
||||
"echo 'Validating examples/reverse-proxy.nginx.conf'"
|
||||
"nginx -t -c /tmp/nginx-kit/examples/reverse-proxy.nginx.conf"
|
||||
"echo 'Validating optional security and hide-powered-by snippets'"
|
||||
"nginx -t -c /tmp/nginx-kit/optional-snippets.nginx.conf"
|
||||
"echo 'Validating modern http2 on snippets'"
|
||||
"nginx -t -c /tmp/nginx-kit/modern-http2.nginx.conf"
|
||||
) -join "; "
|
||||
|
||||
docker run --rm `
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue