From 4fc4140911abc073e0428f87d84f24bd135f511a Mon Sep 17 00:00:00 2001 From: Aciel Date: Mon, 22 Feb 2021 14:11:32 +0500 Subject: [PATCH 1/3] Added flexget.subfolder.conf.sample flexget.subfolder.conf.sample for Swag --- flexget.subfolder.conf.sample | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 flexget.subfolder.conf.sample diff --git a/flexget.subfolder.conf.sample b/flexget.subfolder.conf.sample new file mode 100644 index 000000000..3d4299ee2 --- /dev/null +++ b/flexget.subfolder.conf.sample @@ -0,0 +1,29 @@ +## Version 2021/02/22 +# make sure that to set 'base_url: /flexget' in your flexget's config.yml + +location /flexget { + return 301 $scheme://$host/flexget/; +} + + location ^~ /flexget/ { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /ldaplogin; + + # enable for Authelia + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app flexget; + set $upstream_port 5050; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + + } + From 5637c3c7876135fec116d0eb54f3d8d2c8737672 Mon Sep 17 00:00:00 2001 From: Aciel Date: Tue, 2 Mar 2021 13:49:08 +0500 Subject: [PATCH 2/3] Added API block to flexget.subfolder.conf.sample --- flexget.subfolder.conf.sample | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/flexget.subfolder.conf.sample b/flexget.subfolder.conf.sample index 3d4299ee2..8406490bc 100644 --- a/flexget.subfolder.conf.sample +++ b/flexget.subfolder.conf.sample @@ -1,5 +1,5 @@ ## Version 2021/02/22 -# make sure that to set 'base_url: /flexget' in your flexget's config.yml +# make sure to set 'base_url: /flexget' under your flexget's config.yml web_server block location /flexget { return 301 $scheme://$host/flexget/; @@ -27,3 +27,13 @@ location /flexget { } + location ^~ /flexget/api { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app flexget; + set $upstream_port 5050; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + + } From 6a7bd0d3390ab2c77f2fcf7dea010832507e960b Mon Sep 17 00:00:00 2001 From: Aciel Date: Tue, 2 Mar 2021 14:03:24 +0500 Subject: [PATCH 3/3] Fixed missing "/" in API Added a missing `/` at the end on of `location ^~ /flexget/api`. --- flexget.subfolder.conf.sample | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/flexget.subfolder.conf.sample b/flexget.subfolder.conf.sample index 8406490bc..9e8a79b95 100644 --- a/flexget.subfolder.conf.sample +++ b/flexget.subfolder.conf.sample @@ -1,6 +1,6 @@ ## Version 2021/02/22 # make sure to set 'base_url: /flexget' under your flexget's config.yml web_server block - +# location /flexget { return 301 $scheme://$host/flexget/; } @@ -22,18 +22,14 @@ location /flexget { set $upstream_app flexget; set $upstream_port 5050; set $upstream_proto http; - proxy_pass $upstream_proto://$upstream_app:$upstream_port; - - + proxy_pass $upstream_proto://$upstream_app:$upstream_port; } - location ^~ /flexget/api { + location ^~ /flexget/api/ { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; set $upstream_app flexget; set $upstream_port 5050; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; - - }