New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open graph url and image resolve from request host parameter #2183
Comments
Yes, I know the host name resolution is not perfect and I was already planning to allow the By the way, the host can actually be derived from a couple of headers, not only navidrome/server/middlewares.go Lines 163 to 203 in 387acc5
|
You should now be able to add scheme/host/port to |
Removed the Host forward and set the base url with public host name and it looks like it works for me. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
When using navidrome behind nginx the Host parameter is required to be forwarded by nginx using
proxy_set_header Host $host;
.Only the "share" feature seems to depend on this and it's not obvious without digging in the source code.
navidrome/ui/public/index.html
Lines 33 to 35 in 457e1fc
navidrome/server/public/public_endpoints.go
Lines 62 to 65 in 759ff84
navidrome/server/server.go
Lines 141 to 150 in 457e1fc
Navidrome has a baseURL configuration option but this only allows you to set the "path" prefix and not the public host name. It would be nice if either you could specify the public host name in the configuration or if it was documented here https://www.navidrome.org/docs/usage/security/#network-configuration
Expected Behaviour
Expected that the base path of
og:url
andog:image
would match the base path of the share url.Steps to reproduce
You will notice that the open graph url and image host name is the same as the one used in nginx proxy pass i.e
Platform information
Additional information
Note: this only affects shares when they're rendered as embeds based on the open graph metadata. It does not effect album art rendered in the navidrome UI itself as the UI uses relative URL.
The text was updated successfully, but these errors were encountered: