diff options
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 6 |
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. |