Skip to content

Commit

Permalink
HTTP/2 support. Fixes #17
Browse files Browse the repository at this point in the history
  • Loading branch information
lmakarov committed Mar 6, 2018
1 parent 69eabc7 commit 46abdcc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 1 addition & 2 deletions conf/nginx/nginx.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ http {
}

server {
listen 443;
listen 443 ssl http2;

server_name _; # This is just an invalid value which will never trigger on a real hostname.

ssl_certificate /etc/nginx/server.crt;
ssl_certificate_key /etc/nginx/server.key;

ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
Expand Down
3 changes: 1 addition & 2 deletions conf/nginx/vhosts.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
## HTTPS
server {

listen 443;
listen 443 ssl http2;
{{ range $host := split .Hosts "," }}

server_name {{ $host }};
Expand All @@ -53,7 +53,6 @@
ssl_certificate /etc/nginx/server.crt;
ssl_certificate_key /etc/nginx/server.key;

ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
Expand Down
12 changes: 12 additions & 0 deletions tests/smoke-test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ teardown() {
unset output
}

@test "Proxy uses HTTP/2 for HTTPS connections" {
[[ ${SKIP} == 1 ]] && skip

run curl -kI https://project1.docksal
[[ "$output" =~ "HTTP/2 200" ]]
unset output

run curl -kI https://project2.docksal
[[ "$output" =~ "HTTP/2 200" ]]
unset output
}

@test "Proxy stops project containers after \"${PROJECT_INACTIVITY_TIMEOUT}\" of inactivity" {
[[ ${SKIP} == 1 ]] && skip

Expand Down

0 comments on commit 46abdcc

Please sign in to comment.