mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
Tests: - Inside container, run 'curl http://localhost/transmission/' and 'curl http://localhost/transmission/web'. Notice that '409 Conflict' errors are thrown. - Apply the patch, run ./setup.py install and restart apache. Run the curl commands again and this time, they lead to 302 redirects instead. [sunil]: Update comment and make the redirect temporary. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org> Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
##
|
|
## On all sites, provide Transmission on a default path: /transmission
|
|
##
|
|
## Requires the following Apache modules to be enabled:
|
|
## mod_headers
|
|
## mod_proxy
|
|
## mod_proxy_http
|
|
##
|
|
<Location /transmission>
|
|
ProxyPass http://localhost:9091/transmission
|
|
Include includes/freedombox-single-sign-on.conf
|
|
<IfModule mod_auth_pubtkt.c>
|
|
TKTAuthToken "admin" "bit-torrent"
|
|
</IfModule>
|
|
## Send the scheme from user's request to enable Transmission to
|
|
## redirect URLs, set cookies, set absolute URLs (if any)
|
|
## properly.
|
|
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
|
|
|
|
# Make redirects to avoid 409 Conflict errors. See: #2219. Upstream issue:
|
|
# https://github.com/transmission/transmission/pull/857 . Drop this
|
|
# workaround with Transmission >= 4.0.
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine On
|
|
RewriteCond %{REQUEST_URI} ^/transmission/$
|
|
RewriteRule .* /transmission/web/ [R=302,L]
|
|
RewriteCond %{REQUEST_URI} ^/transmission/web$
|
|
RewriteRule .* /transmission/web/ [R=302,L]
|
|
</IfModule>
|
|
</Location>
|