update
This commit is contained in:
parent
a16316979c
commit
a2929be104
6 changed files with 43 additions and 10 deletions
|
|
@ -22,6 +22,30 @@ $serverSnippetConfig = @(
|
|||
|
||||
$serverSnippetConfigShell = $serverSnippetConfig -replace "`n", "\\n"
|
||||
|
||||
$optionalSnippetConfig = @(
|
||||
"events {}"
|
||||
""
|
||||
"http {"
|
||||
" include /etc/nginx/mime.types;"
|
||||
" default_type application/octet-stream;"
|
||||
""
|
||||
" server {"
|
||||
" listen 8080;"
|
||||
" include /etc/nginx/kit/security-legacy.conf;"
|
||||
""
|
||||
" location /fastcgi {"
|
||||
" include /etc/nginx/kit/fastcgi/hide-powered-by.conf;"
|
||||
" }"
|
||||
""
|
||||
" location /proxy {"
|
||||
" include /etc/nginx/kit/proxy_pass/hide-powered-by.conf;"
|
||||
" }"
|
||||
" }"
|
||||
"}"
|
||||
) -join "\n"
|
||||
|
||||
$optionalSnippetConfigShell = $optionalSnippetConfig -replace "`n", "\\n"
|
||||
|
||||
$containerCommand = @(
|
||||
"set -eu"
|
||||
"apk add --no-cache openssl >/dev/null"
|
||||
|
|
@ -35,10 +59,13 @@ $containerCommand = @(
|
|||
"ln -s /etc/nginx/kit /tmp/nginx-kit/examples/kit"
|
||||
"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"
|
||||
"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"
|
||||
) -join "; "
|
||||
|
||||
docker run --rm `
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue