First, this is an edge case very specific to my setup, with the /f subfolder.
Discourse link on hamburger menu points to /faq, without the subfolder, because /faq startsWith /f.
Considering this quote:
I guess we could change
const found = url.startsWith(baseUri);
to something like
const found = url === baseUri || url.startsWith(`${baseUri}/`);
So it would match /f, /f/, /f/faq, but not /faq, correctly prepending the baseUri to the latter.
Anyway, the route itself also doesn’t work, /f/faq returns a 404, so I think there’s similar logic on the router level. I’ve previously noticed that /f/following wasn’t working as well (cc @merefield).
Finally, I changed the faq url site setting to /f/guidelines as a workaround, which fixed the link and the 404, but generated a minor oddity of having both the Guidelines and FAQ terms on the nav bar, both pointing to what’s set on faq url (you can check on the actual page):
About the 404 on /f/faq and /f/favicon/proxied, when I CURL these routes inside the container, bypassing Nginx, it works. I was able to fix it by changing the location directive described in Serve Discourse from a subfolder (path prefix) instead of a subdomain from location /subfolder to location /subfolder/.
The nav bar showing both Guidelines + FAQ is the expected behavior, it’s unlikely the user will override the faq url with the same url.