From 9af539b51c0d31ca5c97b0b13e918e11aa48e8a7 Mon Sep 17 00:00:00 2001 From: Joe Nelson Date: Wed, 9 Aug 2017 08:42:32 -0500 Subject: [PATCH] Treat blank pre-request config as missing (#929) --- CHANGELOG.md | 1 + src/PostgREST/Config.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67288ab50..a5f11b073 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - #896, Boolean env var interpolation in config file - @begriffs - #885, OpenAPI repetition reduced by using more definitions- @ldesgoui - #924, Improve relations initialization time - @9too +- #927, Treat blank pre-request as missing - @begriffs ## [0.4.2.0] - 2017-06-11 diff --git a/src/PostgREST/Config.hs b/src/PostgREST/Config.hs index e73a7b663..9c7bd5df1 100644 --- a/src/PostgREST/Config.hs +++ b/src/PostgREST/Config.hs @@ -114,7 +114,7 @@ readOptions = do <*> (fromMaybe False . join . fmap coerceBool <$> C.key "secret-is-base64") <*> (fromMaybe 10 . join . fmap coerceInt <$> C.key "db-pool") <*> (join . fmap coerceInt <$> C.key "max-rows") - <*> C.key "pre-request" + <*> (mfilter (/= "") <$> C.key "pre-request") <*> pure False case mAppConf of