diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c0711e81..0aa7321ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - #1099, Numbers in json path `?select=data->1->>key` now get treated as json array indexes instead of keys - @steve-chavez - #1128, Allow finishing a json path with a single arrow `->`. Now a json can be obtained without resorting to casting, Previously: `/json_arr?select=data->>2::json`, now: `/json_arr?select=data->2` - @steve-chavez +- #724, Change server-host default of *4 to 127.0.0.1 ## [0.5.0.0] - 2018-05-14 diff --git a/docker/Dockerfile b/docker/Dockerfile index c5d7a8289..c31237a89 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -28,7 +28,7 @@ ENV PGRST_DB_URI= \ PGRST_DB_SCHEMA=public \ PGRST_DB_ANON_ROLE= \ PGRST_DB_POOL=100 \ - PGRST_SERVER_HOST=*4 \ + PGRST_SERVER_HOST="127.0.0.1" \ PGRST_SERVER_PORT=3000 \ PGRST_SERVER_PROXY_URI= \ PGRST_JWT_SECRET= \ diff --git a/src/PostgREST/Config.hs b/src/PostgREST/Config.hs index 8af03deaf..dc9c49ade 100644 --- a/src/PostgREST/Config.hs +++ b/src/PostgREST/Config.hs @@ -132,7 +132,7 @@ readOptions = do <*> C.key "db-anon-role" <*> (mfilter (/= "") <$> C.key "server-proxy-uri") <*> C.key "db-schema" - <*> (fromMaybe "*4" . mfilter (/= "") <$> C.key "server-host") + <*> (fromMaybe "127.0.0.1" . mfilter (/= "") <$> C.key "server-host") <*> (fromMaybe 3000 . join . fmap coerceInt <$> C.key "server-port") <*> (fmap encodeUtf8 . mfilter (/= "") <$> C.key "jwt-secret") <*> (fromMaybe False . join . fmap coerceBool <$> C.key "secret-is-base64") @@ -209,7 +209,7 @@ readOptions = do |db-anon-role = "postgres" |db-pool = 10 | - |server-host = "*4" + |server-host = "127.0.0.1" |server-port = 3000 | |## base url for swagger output diff --git a/test/io-tests/configs/base64-secret-from-file.config b/test/io-tests/configs/base64-secret-from-file.config index 98e116b76..295d27cd4 100644 --- a/test/io-tests/configs/base64-secret-from-file.config +++ b/test/io-tests/configs/base64-secret-from-file.config @@ -2,7 +2,7 @@ db-uri = "postgres:///postgrest_test" db-schema = "test" db-anon-role = "postgrest_test_anonymous" db-pool = 1 -server-host = "*4" +server-host = "127.0.0.1" server-port = 49421 # Read secret from a file: /dev/stdin (alias for standard input) diff --git a/test/io-tests/configs/role-claim-key.config b/test/io-tests/configs/role-claim-key.config index 10ca1a00d..e6fbee669 100644 --- a/test/io-tests/configs/role-claim-key.config +++ b/test/io-tests/configs/role-claim-key.config @@ -2,7 +2,7 @@ db-uri = "postgres:///postgrest_test" db-schema = "test" db-anon-role = "postgrest_test_anonymous" db-pool = 1 -server-host = "*4" +server-host = "127.0.0.1" server-port = 49421 role-claim-key = "$(ROLE_CLAIM_KEY)" jwt-secret = "reallyreallyreallyreallyverysafe" diff --git a/test/io-tests/configs/secret-from-file.config b/test/io-tests/configs/secret-from-file.config index 26a71112f..00f703e77 100644 --- a/test/io-tests/configs/secret-from-file.config +++ b/test/io-tests/configs/secret-from-file.config @@ -2,7 +2,7 @@ db-uri = "postgres:///postgrest_test" db-schema = "test" db-anon-role = "postgrest_test_anonymous" db-pool = 1 -server-host = "*4" +server-host = "127.0.0.1" server-port = 49421 # Read secret from a file: /dev/stdin (alias for standard input) diff --git a/test/memory-tests/config b/test/memory-tests/config index 31ba9d368..53979bdf2 100644 --- a/test/memory-tests/config +++ b/test/memory-tests/config @@ -2,7 +2,7 @@ db-uri = "postgres:///postgrest_test" db-schema = "test" db-anon-role = "postgrest_test_anonymous" db-pool = 1 -server-host = "*4" +server-host = "127.0.0.1" server-port = 49421 jwt-secret = "reallyreallyreallyreallyverysafe"