From d99462be013053e6dfe17a0c5eadf843b8d8bceb Mon Sep 17 00:00:00 2001 From: Joe Nelson Date: Tue, 25 Apr 2017 22:44:24 -0500 Subject: [PATCH] Revert "Fix swagger-ui when "server-proxy-uri" is not set (#857)" This was a bug in swagger-ui, not postgrest --- CHANGELOG.md | 1 - src/PostgREST/App.hs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cff8a7d02..f480e6938 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Resource embedding in views referencing tables in public schema - @fab1an - #777, Empty body is allowed when calling a non-parameterized RPC - @koulakis - #831, Fix proc resource embedding issue with search_path - @steve-chavez -- #857, Fix swagger-ui when "server-proxy-uri" is not set - @feynmanliang - #547, Use read-only transaction for stable/immutable RPC - @begriffs ## [0.4.0.0] - 2017-01-19 diff --git a/src/PostgREST/App.hs b/src/PostgREST/App.hs index be1774c37..938a4590b 100644 --- a/src/PostgREST/App.hs +++ b/src/PostgREST/App.hs @@ -245,7 +245,7 @@ app dbStructure conf apiRequest = let host = configHost conf port = toInteger $ configPort conf proxy = pickProxy $ toS <$> configProxyUri conf - uri Nothing = ("http", host, port, "") + uri Nothing = ("http", host, port, "/") uri (Just Proxy { proxyScheme = s, proxyHost = h, proxyPort = p, proxyPath = b }) = (s, h, p, b) uri' = uri proxy encodeApi ti = encodeOpenAPI (M.elems $ dbProcs dbStructure) ti uri'