Skip to content

Commit 0d01729

Browse files
committed
fix(router): return 404 for non-existing app
1 parent f4c2a24 commit 0d01729

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

router/image/templates/nginx.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ http {
302302
}
303303
location /router-nginx-status {
304304
stub_status on;
305+
return 200;
306+
}
307+
location / {
308+
return 404;
305309
}
306310
}
307311
}

tests/apps_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package tests
44

55
import (
6+
"fmt"
67
"math/rand"
78
"os"
89
"testing"
@@ -108,6 +109,7 @@ func appsLogsTest(t *testing.T, params *utils.DeisTestConfig) {
108109

109110
func appsOpenTest(t *testing.T, params *utils.DeisTestConfig) {
110111
utils.CurlApp(t, *params)
112+
utils.CurlWithFail(t, fmt.Sprintf("http://%s.%s", "this-app-does-not-exist", params.Domain), true, "404 Not Found")
111113
}
112114

113115
func appsRunTest(t *testing.T, params *utils.DeisTestConfig) {

0 commit comments

Comments
 (0)