Two Relative URLs for Webcam Streams

Hopefully, "Development" is the right place to post this topic.

I would like to switch the webcam viewer on the control page between two webcams using the MultiCam plugin. I've been able to get this to work on my LAN using fully qualified URLs (http://octopi.local:8801/?action=stream and http://octopi.local:8800/?action=stream), but I want to use relative URLs (like the original /webcam/?action=stream) for each webcam so that I can access them via my LAN or via WAN without forwarding streaming ports on my router. For example, I would like to have two relative webcam streaming URLs: /webcam_usb/?action=stream and /webcam_pi/?action=stream. I can currently view stream from the relative /webcam URL via LAN or WAN.

I assume that it is not possible to setup two relative URLs through normal settings (please correct me if I'm wrong), but I'm willing to experiment in the code a bit to make this work. To that end, I'm trying to figure out where the actual /webcam relative path is declared/defined. I've grep'd through the files under /home/pi and explored under /home/pi/mjpg-streamer, but I can't get on the trail of it.

Any pointers would be appreciated.

--Scott

I think a concise version of my question is this: How/where in the code is the mpg-streamer output "www-octopi" associated with the relative URL "/webcam"?

That would be in the haproxy.cfg file shipped with OctoPi:

It's an image feature achieved through reverse proxy configuration, has nothing to do with OctoPrint core.

Thanks. I’ll post back to this thread with any progress I make this weekend.