Skip to content

Commit 5163bc8

Browse files
authored
Merge pull request #1061 from Heavensong89/patch-1
SWAG Auto-Proxy - Add Tinyauth
2 parents 401e4ae + e26b501 commit 5163bc8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This mod gives SWAG the ability to auto-detect running containers via labels and
1414
- `swag_port=80` - *optional* - overrides *internal* exposed port (if no preset conf and this label not set, auto-proxy will default to first detected exposed port)
1515
- `swag_proto=http` - *optional* - overrides internal proto (defaults to http)
1616
- `swag_url=containername.domain.com` - *optional* - overrides *server_name* (defaults to `containername.*`)
17-
- `swag_auth=authelia` - *optional* - enables auth methods (options are `authelia`, `authentik`, `ldap` and `http` for basic http auth)
17+
- `swag_auth=authelia` - *optional* - enables auth methods (options are `authelia`, `authentik`, `ldap`, `tinyauth` and `http` for basic http auth)
1818
- `swag_auth_bypass=/api,/othersubfolder` - *optional* - bypasses auth for selected subfolders. Comma separated, no spaces.
1919
- `swag_server_custom_directive=custom_directive;` - *optional* - injects the label value as is into the server block of the generated conf. Must be a valid nginx directive, ending with a semi colon.
2020
- `swag_preset_conf=confname` - *optional* - allows defining a preset conf to use if the container name does not match one (if the conf name is `radarr.subdomain.conf.sample`, set this value to `radarr`). If the container name matches an existing conf, this var will be ignored.

root/app/auto-proxy.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ for CONTAINER in ${AUTO_GEN}; do
9393
elif [ "${swag_auth}" == "authentik" ]; then
9494
sed -i "s|#include /config/nginx/authentik|include /config/nginx/authentik|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
9595
echo "**** Enabling Authentik for ${CONTAINER} ****"
96+
elif [ "${swag_auth}" == "tinyauth" ]; then
97+
sed -i "s|#include /config/nginx/tinyauth|include /config/nginx/tinyauth|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
98+
echo "**** Enabling Tinyauth for ${CONTAINER} ****"
9699
elif [ "${swag_auth}" == "http" ]; then
97100
sed -i "s|#auth_basic|auth_basic|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
98101
echo "**** Enabling basic http auth for ${CONTAINER} ****"
@@ -167,6 +170,9 @@ DUDE
167170
elif [ "${swag_auth}" == "authentik" ]; then
168171
sed -i "s|#include /config/nginx/authentik|include /config/nginx/authentik|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
169172
echo "**** Enabling Authentik for ${CONTAINER} ****"
173+
elif [ "${swag_auth}" == "tinyauth" ]; then
174+
sed -i "s|#include /config/nginx/tinyauth|include /config/nginx/tinyauth|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
175+
echo "**** Enabling Tinyauth for ${CONTAINER} ****"
170176
elif [ "${swag_auth}" == "http" ]; then
171177
sed -i "s|#auth_basic|auth_basic|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
172178
echo "**** Enabling basic http auth for ${CONTAINER} ****"

0 commit comments

Comments
 (0)