Font file URLs don't include subpath in 5.37.0

Summary
In a new 5.37.0 install using a subpath, font files are not found because the subpath is not in the URL.

I installed a new instance of Mattermost 5.37.0 on a subpath behind NGINX. I set the subpath in the config.json SiteURL, and everything appears to be retrieved correctly except that font files (.woff, .woff2) are not (404 error). It looks like the subpath is not added to the URL for these files. For example, https://…/static/files/3bd5f5c5dd54ccb0c7c26a01c3e99235.woff2. Other files on the “static” path, such as the JS files and image files, have the subpath and are retrieved. After the files were not loaded, I tried setting the subpath using ./mattermost config subpath --path /..., but it didn’t make a difference. Should I be adding some other configuration?

Steps to reproduce
New 5.37.0 install configured with a subpath using SiteURL.

Observed behavior
404 errors for .woff, and .woff2 files, and many characters are not shown correctly in the UI.

@ahmaddanial Are you familiar with this issue or do we need a dev to take a look?

Hello, @amy.blais

I have not come across such issue before. Since this issue is specific to fonts and subpath, I’d say the dev team will be the best direction moving fotward.

@linda @caleb.roseland Let me know if you’re familiar with this issue / if this might be a bug.

Hi! Could you find a solution to this problem?
It still appears in the latest version.

Thank you!

Hi @kcholoren and welcome to the Mattermost forums!

I’ve deployed 7.1.2 in a subdirectory and my .woff and .woff2 files are being retrived without issues. Can you share your nginx configuration if you’re using nginx as a reverse proxy in front of mattermost?

On my setup, this is the nginx configuration:

location ~ /chat/api/v[0-9]+/(users/)?websocket$ {
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    client_max_body_size 50M;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Frame-Options SAMEORIGIN;
    proxy_buffers 256 16k;
    proxy_buffer_size 16k;
    proxy_read_timeout 600s;
    proxy_pass http://127.0.0.1:8065;
}

location /chat/ {
    client_max_body_size 50M;
    proxy_set_header Connection "";
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Frame-Options SAMEORIGIN;
    proxy_buffers 256 16k;
    proxy_buffer_size 16k;
    proxy_read_timeout 600s;
    proxy_pass http://127.0.0.1:8065;
}

SiteURL is set to:

$ mmctl --local config get ServiceSettings.SiteURL
"https://mydomain.com/chat"