SimpleAuth + octoprint webcam

This commit is contained in:
Neale Pickett 2022-09-10 17:32:15 -06:00
parent 36041dbd70
commit c3b9d024f5
2 changed files with 16 additions and 14 deletions

View File

@ -5,12 +5,10 @@
#acme_ca https://acme-staging-v02.api.letsencrypt.org/directory #acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
} }
import /run/secrets/caddy-users
(restricted-access) { (restricted-access) {
forward_auth simpleauth:8080 { forward_auth simpleauth:8080 {
uri / uri /
copy_headers Set-Cookie copy_headers X-Simpleauth-Token
} }
} }
@ -60,6 +58,13 @@ deergrove.woozle.org, sweetums.woozle.org {
header_up X-Script-Name "/octoprint" header_up X-Script-Name "/octoprint"
} }
} }
handle /webcam/* {
# Octoprint doesn't properly prefix webcam URLs
import restricted-access
reverse_proxy {
to 192.168.86.36:80
}
}
handle { handle {
import restricted-access import restricted-access
file_server { file_server {

View File

@ -22,20 +22,17 @@ services:
target: /etc/caddy/Caddyfile target: /etc/caddy/Caddyfile
- source: index.html - source: index.html
target: /www/index.html target: /www/index.html
secrets:
- caddy-users
extra_hosts: extra_hosts:
- host.docker.internal:host-gateway - host.docker.internal:host-gateway
simpleauth: simpleauth:
image: ghcr.io/nealey/simpleauth image: ghcr.io/nealey/simpleauth
volumes: command:
- type: bind - -secret
source: /home/neale/src/simpleauth/static - /run/secrets/simpleauth.key
target: /static
read_only: true
secrets: secrets:
- passwd - passwd
- simpleauth.key
plex: plex:
image: ghcr.io/linuxserver/plex image: ghcr.io/linuxserver/plex
@ -151,18 +148,18 @@ configs:
name: dave.yaml-v3 name: dave.yaml-v3
Caddyfile: Caddyfile:
file: Caddyfile file: Caddyfile
name: Caddyfile-v27 name: Caddyfile-v35
index.html: index.html:
file: index.html file: index.html
name: index.html-v12 name: index.html-v12
secrets: secrets:
caddy-users:
file: secrets/caddy-users
name: caddy-users-v2
passwd: passwd:
file: secrets/passwd file: secrets/passwd
name: passwd-v1 name: passwd-v1
simpleauth.key:
file: secrets/simpleauth.key
name: simpleauth.key-v1
networks: networks:
hostnet: hostnet: