Score:1

Force browser requests to respect rewritten path in nginx

pk flag

I've set up nginx as a back proxy. This back proxy rewrites the path of https://<my-domain>/artifactory to http://127.0.0.1:8082 essentially stripping off the path. This works on the first request, but when the browser loads the index.html, that file mentions a bunch of assets with relative paths like /ui/css/app.c2d4f448.css. When the browser is requesting them from the server it is requesting with http://<my-domain>/ui/css/app.c2d4f448.css instead of with the /artifactory path. Is there any way to instruct the browser to append a path to the host before making it's requests, via headers or something?

Ivan Shatsky avatar
gr flag
Read [this](https://serverfault.com/questions/932628/how-to-handle-relative-urls-correctly-with-a-nginx-reverse-proxy) Q/A.
pk flag
Thanks @IvanShatsky not sure why the site didn't show that near exact duplicate when I was searching for it. Ty, closing question
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.