Fix proxy-read-timeout is not set for HTTPS

This commit is contained in:
Yihao committed 2020-07-30 18:39:23 +09:30
1 parent 2efa8483e2
commit 9cbe771123
2 files changed
+36

No files matched your search

@@ -84,6 +84,7 @@ server {
proxy_pass http://{{ $.APP }}-{{ $upstream_port }}; proxy_pass http://{{ $.APP }}-{{ $upstream_port }};
{{ if eq $.HTTP2_PUSH_SUPPORTED "true" }}http2_push_preload on; {{ end }} {{ if eq $.HTTP2_PUSH_SUPPORTED "true" }}http2_push_preload on; {{ end }}
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_read_timeout {{ $.PROXY_READ_TIMEOUT }};
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection; proxy_set_header Connection $http_connection;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
+35
View File
@@ -138,6 +138,41 @@ teardown() {
assert_output_contains "45s;" 0 assert_output_contains "45s;" 0
} }
@test "(nginx-vhosts) nginx:set proxy-read-timeout (with SSL)" {
setup_test_tls
deploy_app
run /bin/bash -c "dokku nginx:set $TEST_APP proxy-read-timeout 45s"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku nginx:show-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_output_contains "45s;"
run /bin/bash -c "dokku nginx:set $TEST_APP proxy-read-timeout"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku nginx:show-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_output_contains "45s;" 0
}
@test "(nginx-vhosts) nginx:build-config (with SSL and unrelated domain)" { @test "(nginx-vhosts) nginx:build-config (with SSL and unrelated domain)" {
setup_test_tls setup_test_tls
add_domain "node-js-app.dokku.me" add_domain "node-js-app.dokku.me"