-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web resources should be accessed using relative path #3761
Comments
Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template! |
I can second that. I've read in previous issues that ZM_BASE_URL is deprecated, but the idea is sound. I also tried injecting a tag, but that didn't help
In the browser's js console, I still see lots of red 404 entries. I also tried setting HTTP headers that, according to spec, are supposed to suggest base URI. Apparently, both and these headers are completely ignored by ZM.
We do need a mechanism to reliably hide ZM behind a reverse proxy. Preferably, this mechanism should use either relative URLs or standard absolute URL prefixing mechnisms ( or Content-Base header). Unfortunately, I'm not a PHP dev and can't contribute much. |
Another probably related issue: some URLs are stepping one level up. Say, if my actual base URL is /my/cams/admin, some resources are being fetched from /my/cams (losing the /admin part of the URL). |
A temporary somewhat working workaround:
Still, snapshot thumbnails are attempted to fetch from an absolute /index.php. Android app is having trouble automatically detecting cgi-bin (had to specify the path manually; still doesn't load monitors). Prolly something else is broken as well. At least I can view the stream in the web browser now. Still, this has to be fixed. |
I run ZM behind reverse proxies all the time.... with and with the /zm.... havn't done a more complex url change. The issue is further complicated by multi-server. Wherever we are using an absolute url, we are likely dealing with a multi-server case. |
Describe Your Environment
Describe the bug
All web elements should be requested using a relative path, as described by ZM_BASE_URL.
However, when setup using a reverse proxy on /services/zoneminder, it's appartent that a lot of resources are requested using an absolute path and breaks a lot of features :
/cgi-bin/nph-zms
) in the htmlsrc="/cgi-bin/nph-zms?...
rp-nginx/nginx.conf :
docker-compose.yml
The text was updated successfully, but these errors were encountered: