My apologies, I should have been more clear about my environment and constraints. I’m dev’ing locally, but it’s for servers on an intranet. Our cert management is a somewhat tedious process so I’m attempting to use basepath/subfolder/subpath instead of subdomains because we’re trying a variety of ide’s. so far rstudio server is the only one that doesn’t use relative redirects or a basepath configuration.
I was finally able to get redirects to work by fixing my header_down as below. It attempts to strip the protocol, hostname, port, and initial slash from the location header and replace it with a relative ./
This fix won’t work with content, just a redirect. I also don’t know how robust this regex is, so it may need additional tweaking.
header_down Location ([^:]+://[^:]+(:[0-9]+)?/) ./