Album covers not loaded when using non-standard HTTP port
Reproduce
- Setup the server with Ansible but with manual Nginx/certbot configuration
- Install frontend with Nginx according to manual
- Now if the server is configured at a non-standard HTTPS port (which I understand is not directly supported) everything seems to work fine, except album covers.
In my example the host is configured to use:
https://example.com:1234
In the web browser console you can see:
Content Security Policy: The page’s settings blocked the loading of a resource at https://example.com/media/__sized__/attachments/17/8f/86/attachment_cover-f49c0abb-a347-4cf3-ae39-dd1499ca26e2-crop-c0-5__0-5-200x200.png (“img-src”).
I.e the chunk-index-vendors
script will try connect to https://example.com
without the port number instead of the proper https://example.com:1234
NOTE: this looks like a CSP error, but it is actually not an issue with CSP because the url that it is trying to access simply does not work.
Is there a way to work around this? My .env file is configure like this
FUNKWHALE_HOSTNAME=example.com # <--- without the port number, is this correct?
FUNKWHALE_PROTOCOL=https