aboutsummaryrefslogtreecommitdiffhomepage
path: root/config/config.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-01-31 21:57:20 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-01-31 21:57:20 -0800
commitb78172033fe9f03b5e1ffe4d235b9ab4fb23766d (patch)
tree7dc9a8e74c3cbc89356e6f9d46f7caa1774d0cd4 /config/config.go
parentb0442e027771c2cf33b92557a7e73fa4f85849cf (diff)
Show API URL endpoints in user interface
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go
index bf4f43d..7788a38 100644
--- a/config/config.go
+++ b/config/config.go
@@ -55,7 +55,11 @@ func (c *Config) HasDebugMode() bool {
// BaseURL returns the application base URL.
func (c *Config) BaseURL() string {
- return c.get("BASE_URL", defaultBaseURL)
+ baseURL := c.get("BASE_URL", defaultBaseURL)
+ if baseURL[len(baseURL)-1:] == "/" {
+ baseURL = baseURL[:len(baseURL)-1]
+ }
+ return baseURL
}
// DatabaseURL returns the database URL.