#1076: [webui] 1.2.x - impossible to reverse proxy with apache
-------------------------------+--------------------------------------------
Reporter: orbisvicis | Owner: damoxc
Type: bug | Status: new
Priority: critical | Milestone: 1.2.0
Component: webui | Version: 1.2.0_dev
Keywords: webui, regression |
-------------------------------+--------------------------------------------
Comment(by orbisvicis):
The 1.1.x webui included a command-switch to dynamically change the
webroot - that is, prefix all urls and redirects with a base url (did it
work for all headers/cookies, or only redirects?). See http://forum
.deluge-torrent.info/viewtopic.php?f=7&t=10165&st=0&sk=t&sd=a#p53605
1.2.x does not offer this, and because 1.2.x uses ajax/xmlhttprequest it
is not possible to reverse proxy deluge-web behind apache, for several
reasons:
* Javascript does not preserve the REFERER Header. Apache mod_rewrite
rules such as the following will no longer work.
{{{
RewriteCond %{HTTP_REFERER} protocol://some.website.uri:port/deluge/.*
RewriteCond %{REQUEST_URI} !^/deluge/.*
RewriteRule ^/(.*) /deluge/$1 [PT]
}}}
(notice that without tracking the Referer, Rewrite rules most likely
would conflict with other webapps)
* Apache substitute filters are somewhat broken. The following will not
work (to rewrite the urls in the xml[ajax],css,javascript,and html)
{{{
FilterProvider text_inflate inflate resp=Content-Type $text
FilterChain +text_inflate
FilterProvider html_sed sed resp=Content-Type $html
FilterChain +html_sed
OutputSed s#url(["']\([^"']\{1,\}\)["'])#url(/deluge\1)#
FilterProvider js_sed sed resp=Content-Type $javascript
FilterChain +js_sed
OutputSed
s#'\(\(/[a-zA-Z]\{1,\}\)\{1,\}/[a-zA-Z]\{1,\}\.[a-zA-Z]\{2,3\}\)'#'/deluge\1'#
FilterProvider xml_sed sed resp=Content-Type $xml
FilterChain +xml_sed
OutputSed
s#\(\(/[a-zA-Z]\{1,\}\)\{1,\}/[a-zA-Z]\{1,\}\.[a-zA-Z]\{2,3\}\)#/deluge\1#
FilterProvider css_sed sed resp=Content-Type $css
FilterChain +css_sed
OutputSed s#url(\([^)]\{1,\}\))#url(/deluge\1)#
FilterProvider text_deflate deflate resp=Content-Type $text
FilterChain +text_deflate
}}}
(notice in this case the limitation with mod_proxy_html: it does not
parse inline css. That's why it is also necessary to rewrite the html.)
This is why I'm asking for a 1.2.x re-implementation of this very critical
1.1.x feature.
--
Ticket URL: <http://dev.deluge-torrent.info/ticket/1076#comment:1>
Deluge <http://deluge-torrent.org/>
Deluge project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/deluge-dev?hl=.