Merge pull request #858 from progrium/857-disable-server-tokens

Disable server tokens in nginx. Closes #857
This commit is contained in:
Jose Diaz-Gonzalez
2015-01-03 22:12:22 -05:00
2 changed files with 11 additions and 2 deletions

View File

@@ -44,6 +44,7 @@ events {
}
http {
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;

View File

@@ -4,15 +4,23 @@ load test_helper
setup() {
create_app
setup_test_tls
deploy_app
}
teardown() {
destroy_app
}
@test "nginx (no server tokens)" {
deploy_app
run /bin/bash -c "curl -s -D - $(dokku url $TEST_APP) -o /dev/null | egrep '^Server' | egrep '[0-9]+'"
echo "output: "$output
echo "status: "$status
assert_failure
}
@test "nginx:build-config (with SSL CN mismatch)" {
setup_test_tls
deploy_app
run /bin/bash -c "dokku domains $TEST_APP | grep node-js-app.dokku.me"
echo "output: "$output
echo "status: "$status