[cups.development] [RFE] STR #3614: Web interface: make all links and redirects relative

Olo cups at olo.org.pl
Tue Jul 6 07:43:17 PDT 2010


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Most links in the web interface (http://cups.server:631) are absolute,
which makes it a real pain to e.g. expose the interface through a HTTP
proxy under a different path.

For example, based on the recipe available here at
http://www.wlug.org.nz/ApacheReverseProxy, one can expose CUPS through a
Apache 2 proxy:

<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPass /cups/ http://localhost:631/
ProxyHTMLURLMap http://localhost:631/ /cups/
<Location /cups>
ProxyPassReverse http://localhost:631/
SetOutputFilter proxy-html
ProxyHTMLURLMap /               /cups/
ProxyHTMLURLMap /cups/          /cups/
</Location>
</IfModule>

The proxy-html filter will rewrite most of the links, but some will become
broken (because of inconsistence in the presence of trailing slashes), and
redirects in the admin interface (which occur after changing settings)
aren't rewritten and point to absolute paths.

The links in the interface should all be converted to relative. For
redirects, it's not obvious, because officially HTTP redirects don't allow
relative links. However, due to them being widespread, some browsers
tolerate them.

Ideally, the redirect shold build the URL from browser supplied
information, or simply refresh the current page without redirecting to a
different address.

Link: http://www.cups.org/str.php?L3614
Version:  -feature





More information about the cups-devel mailing list