mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
fix: use root URL to generate absolute proxy URL
When using `BASE_URL` with a subfolder, the root URL must be used to avoid base folder appearing twice in the generated URL.
This commit is contained in:
parent
3e0e8dda2b
commit
4bbc12e3b2
2 changed files with 15 additions and 6 deletions
|
@ -40,9 +40,9 @@ func ProxifyAbsoluteURL(router *mux.Router, mediaURL string) string {
|
|||
return proxifyURLWithCustomProxy(mediaURL, customProxyURL)
|
||||
}
|
||||
|
||||
// Note that the proxyified URL is relative to the root URL.
|
||||
proxifiedUrl := ProxifyRelativeURL(router, mediaURL)
|
||||
|
||||
absoluteURL, err := url.JoinPath(config.Opts.BaseURL(), proxifiedUrl)
|
||||
absoluteURL, err := url.JoinPath(config.Opts.RootURL(), proxifiedUrl)
|
||||
if err != nil {
|
||||
return mediaURL
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue