From 2f88315fdf3dc6d8f7f23ad91ac1f4ddb58b8f42 Mon Sep 17 00:00:00 2001 From: casjay Date: Fri, 26 Jun 2026 15:13:47 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20Remove=20WebDAV=20sync?= =?UTF-8?q?=20support;=20SuperSync=20only=20=F0=9F=97=91=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebDAV was added as an alternative sync provider but the design decision is to ship SuperSync only. Removes all WebDAV env vars, the nginx reverse proxy block for /webdav/, and the WebDAV branch in __pre_execute that wrote sync-config-default-override.json. SuperSync behavior is unchanged. - Dockerfile: drop WEBDAV_BACKEND, WEBDAV_BASE_URL, WEBDAV_USERNAME, WEBDAV_SYNC_FOLDER_PATH from ENV declarations - rootfs/usr/local/etc/docker/init.d/zz-nginx.sh: remove WEBDAV_* variable declarations, nginx /webdav/ proxy location block, and WebDAV branch in __pre_execute sync config generation Dockerfile rootfs/usr/local/etc/docker/functions/entrypoint.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh --- Dockerfile | 4 --- .../local/etc/docker/functions/entrypoint.sh | 4 +-- .../usr/local/etc/docker/init.d/zz-nginx.sh | 34 ------------------- 3 files changed, 2 insertions(+), 40 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff8ef59..d8114d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -117,10 +117,6 @@ ENV ENV="~/.bashrc" \ HOSTNAME="casjaysdev-${IMAGE_NAME}" \ WWW_ROOT_DIR="${WWW_ROOT_DIR}" \ APP_PORT="80" \ - WEBDAV_BACKEND="" \ - WEBDAV_BASE_URL="" \ - WEBDAV_USERNAME="" \ - WEBDAV_SYNC_FOLDER_PATH="" \ SYNC_INTERVAL="" \ IS_COMPRESSION_ENABLED="" \ IS_ENCRYPTION_ENABLED="" \ diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index cddc361..44265c9 100644 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # shellcheck shell=bash # - - - - - - - - - - - - - - - - - - - - - - - - - -##@Version : 202606261200-git +##@Version : 202606261430-git # @@Author : Jason Hempstead # @@Contact : git-admin@casjaysdev.pro # @@License : LICENSE.md @@ -802,7 +802,7 @@ __set_user_group_id() { return 0 fi if [ -z "$set_user" ] || [ "$set_user" = "root" ]; then - return + return 0 fi if grep -shq "^$set_user:" "/etc/passwd" "/etc/group"; then if __check_for_guid "$set_gid"; then diff --git a/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh b/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh index e7abe54..cf086ed 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh @@ -229,10 +229,6 @@ fi # Additional predefined variables # Runtime sync-provider env vars (read in __pre_execute to seed sync-config-default-override.json) APP_PORT="${APP_PORT:-80}" -WEBDAV_BACKEND="${WEBDAV_BACKEND:-}" -WEBDAV_BASE_URL="${WEBDAV_BASE_URL:-}" -WEBDAV_USERNAME="${WEBDAV_USERNAME:-}" -WEBDAV_SYNC_FOLDER_PATH="${WEBDAV_SYNC_FOLDER_PATH:-}" SYNC_INTERVAL="${SYNC_INTERVAL:-}" IS_COMPRESSION_ENABLED="${IS_COMPRESSION_ENABLED:-}" IS_ENCRYPTION_ENABLED="${IS_ENCRYPTION_ENABLED:-}" @@ -334,7 +330,6 @@ __update_conf_files() { # set hostname local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" local app_port="${APP_PORT:-80}" - local webdav_backend="${WEBDAV_BACKEND:-}" local wwwroot="${WWW_ROOT_DIR:-/usr/local/share/httpd/default}" local nginx_conf @@ -363,23 +358,6 @@ __update_conf_files() { echo ' add_header Cache-Control "public, immutable";' echo " access_log off;" echo " }" - if [ -n "$webdav_backend" ]; then - echo "" - echo " # WebDAV reverse proxy — strips /webdav/ prefix before forwarding" - echo " location = /webdav { return 302 /webdav/; }" - echo " location /webdav/ {" - echo " resolver 127.0.0.11;" - echo ' rewrite ^/webdav/(.*)$ /$1 break;' - echo " proxy_pass ${webdav_backend};" - echo ' proxy_set_header Host $http_host;' - echo ' proxy_set_header X-Real-IP $remote_addr;' - echo ' proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' - echo ' proxy_set_header X-Forwarded-Proto $scheme;' - echo ' proxy_pass_header Authorization;' - echo " client_max_body_size 0;" - echo " proxy_request_buffering off;" - echo " }" - fi echo "" echo " # Health check endpoint used by HEALTHCHECK in Dockerfile" echo " location = /health {" @@ -419,18 +397,6 @@ __pre_execute() { if command -v jq >/dev/null 2>&1; then local json="{}" - # WebDAV sync provider settings (mutually exclusive with SuperSync) - if [ -n "${WEBDAV_BASE_URL:-}" ]; then - json=$(printf '%s' "$json" | jq '.syncProvider = "WebDAV"') - json=$(printf '%s' "$json" | jq --arg v "$WEBDAV_BASE_URL" '.webDav.baseUrl = $v') - fi - if [ -n "${WEBDAV_USERNAME:-}" ]; then - json=$(printf '%s' "$json" | jq --arg v "$WEBDAV_USERNAME" '.webDav.userName = $v') - fi - if [ -n "${WEBDAV_SYNC_FOLDER_PATH:-}" ]; then - json=$(printf '%s' "$json" | jq --arg v "$WEBDAV_SYNC_FOLDER_PATH" '.webDav.syncFolderPath = $v') - fi - # SuperSync (super-productivity's own operation-based sync server) # SUPERSYNC_BASE_URL overrides the default https://sync.super-productivity.com # Auth tokens are obtained through the in-app login flow after startup.