1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Show API URL endpoints in user interface

This commit is contained in:
Frédéric Guillot 2018-01-31 21:57:20 -08:00
parent b0442e0277
commit b78172033f
11 changed files with 99 additions and 14 deletions

View file

@ -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.