From 424270aabecfe7e9df44c92b2121cdc8ad7fb635 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Tue, 16 Feb 2021 18:11:05 +0000 Subject: [PATCH] Updated Reverse Proxying (markdown) --- Reverse-Proxying.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Reverse-Proxying.md b/Reverse-Proxying.md index 3afdb43..60d3b4d 100644 --- a/Reverse-Proxying.md +++ b/Reverse-Proxying.md @@ -1,6 +1,9 @@ Reverse proxying should be really easy. * If you're proxying to a subdomain, e.g `accounts.jellyf.in/`, a `proxy_pass` or equivalent is enough. -* Proxying to a subfolder is only supported for versions > 0.2.2, and requires the proxy to strip the URL base. Make sure to set the URL base in Settings > General (`ui > url_base` in config.ini). If you're placing it under the same subdomain as Jellyfin, make sure no CSP header is set for jfa-go's subfolder (see example below for NGINX). +* Proxying to a subfolder is only supported for versions > 0.2.2. + * Versions <= v0.3.0 require the proxy to strip the URL base. + * Versions > v0.3.0 don't need the URL Base stripped, but should be proxied to `/` instead. + * Make sure to set the URL base in Settings > General (`ui > url_base` in config.ini). If you're placing it under the same subdomain as Jellyfin, make sure no CSP header is set for jfa-go's subfolder (see example below for NGINX). Below are some simple examples of reverse proxy configs. @@ -27,6 +30,7 @@ server { **NGINX (Subfolder on `/accounts` Jellyfin subdomain)** +Make sure to set your URL Base to `/accounts` in Settings > General. credit to [IngwiePhoenix](https://github.com/IngwiePhoenix). ``` server { @@ -42,13 +46,17 @@ server { # rest of your own config location ~ ^/accounts(.*)$ { + # No longer necessary on versions after v0.3.0 rewrite ^/accounts/(.*) /$1 break; # Remove the CSP header set for Jellyfin proxy_hide_header Content-Security-Policy; add_header Content-Security-Policy ""; - + + # For versions <= v0.3.0 proxy_pass http://localhost:8056; # Change as you need + # For versions > v0.3.0 + # proxy_pass http://localhost:8056/accounts; # Change as you need http2_push_preload on; proxy_set_header Host $host;