From ffccdc6b85680489a0881e1af80edb4f67361709 Mon Sep 17 00:00:00 2001
From: Cullum Smith <cullum@sacredheartsc.com>
Date: Mon, 16 Dec 2024 20:35:26 -0500
Subject: add webdav to dav_server role

---
 .../etc/chromium/policies/managed/policies.json.desktop      |  4 ++++
 files/usr/local/etc/nginx/nginx.conf.common                  |  3 ++-
 files/usr/local/etc/nginx/vhosts.conf.dav_server             | 12 ++++++++++++
 files/usr/local/etc/poudriere.d/make.conf.pkg_repository     |  2 +-
 4 files changed, 19 insertions(+), 2 deletions(-)

(limited to 'files/usr/local/etc')

diff --git a/files/usr/local/etc/chromium/policies/managed/policies.json.desktop b/files/usr/local/etc/chromium/policies/managed/policies.json.desktop
index 3952212..5b92662 100644
--- a/files/usr/local/etc/chromium/policies/managed/policies.json.desktop
+++ b/files/usr/local/etc/chromium/policies/managed/policies.json.desktop
@@ -100,6 +100,10 @@
     "cimiefiiaegbelhefglklhhakcgmhkai": {
       "installation_mode": "normal_installed",
       "update_url": "https://clients2.google.com/service/update2/crx"
+    },
+    "fnaicdffflnofjppbagibeoednhnbjhg": {
+      "installation_mode": "normal_installed",
+      "update_url": "https://clients2.google.com/service/update2/crx"
     }
   },
   "3rdparty": {
diff --git a/files/usr/local/etc/nginx/nginx.conf.common b/files/usr/local/etc/nginx/nginx.conf.common
index 59a4c43..6ed42fa 100644
--- a/files/usr/local/etc/nginx/nginx.conf.common
+++ b/files/usr/local/etc/nginx/nginx.conf.common
@@ -1,6 +1,7 @@
 worker_processes      ${nginx_worker_processes};
 worker_rlimit_nofile  ${nginx_nofile};
-$([ "${nginx_gssapi:-}" = true ] && echo 'load_module "/usr/local/libexec/nginx/ngx_http_auth_spnego_module.so";')
+$([ "${nginx_gssapi:-}"  = true ] && echo 'load_module "/usr/local/libexec/nginx/ngx_http_auth_spnego_module.so";')
+$([ "${nginx_dav_ext:-}" = true ] && echo 'load_module "/usr/local/libexec/nginx/ngx_http_dav_ext_module.so";')
 
 events {
   worker_connections  ${nginx_worker_connections};
diff --git a/files/usr/local/etc/nginx/vhosts.conf.dav_server b/files/usr/local/etc/nginx/vhosts.conf.dav_server
index 0c6e817..8e73d13 100644
--- a/files/usr/local/etc/nginx/vhosts.conf.dav_server
+++ b/files/usr/local/etc/nginx/vhosts.conf.dav_server
@@ -14,6 +14,8 @@ server {
   auth_gss_keytab ${davical_keytab};
   auth_gss_allow_basic_fallback off;
 
+  client_max_body_size ${webdav_upload_sizelimit};
+
   location / {
     auth_gss on;
     satisfy any;
@@ -34,6 +36,16 @@ $(printf '    deny %s;\n' $kerberized_cidrs)
     return 403;
   }
 
+  location ~ ^/webdav($|/(?<dav_path>.*)$) {
+    auth_gss on;
+    auth_gss_allow_basic_fallback on;
+    alias ${webdav_dir}/\$remote_user/\$dav_path;
+    create_full_put_path on;
+    dav_methods PUT DELETE MKCOL COPY MOVE;
+    dav_ext_methods PROPFIND OPTIONS;
+    autoindex on;
+  }
+
   location ~ ^/caldav\.php/\.well-known/ {
     fastcgi_split_path_info ^(.+?\.php)(/.*)$;
     if (!-f \$document_root\$fastcgi_script_name) {
diff --git a/files/usr/local/etc/poudriere.d/make.conf.pkg_repository b/files/usr/local/etc/poudriere.d/make.conf.pkg_repository
index 03dd651..43a6760 100644
--- a/files/usr/local/etc/poudriere.d/make.conf.pkg_repository
+++ b/files/usr/local/etc/poudriere.d/make.conf.pkg_repository
@@ -95,7 +95,7 @@ textproc_en-hunspell_SET=US_LARGE
 textproc_en-hunspell_UNSET=US_STANDARD
 www_chromium_SET=WIDEVINE
 www_firefox_UNSET=PROFILE
-www_nginx_SET=HTTPV3 HTTPV3_QTLS HTTP_AUTH_KRB5 HTTP_AUTH_LDAP
+www_nginx_SET=HTTPV3 HTTPV3_QTLS HTTP_AUTH_KRB5 HTTP_AUTH_LDAP HTTP_DAV_EXT
 www_nginx_UNSET=MAIL
 x11-toolkits_gtk30_UNSET=COLORD BROADWAY
 x11_kde5_UNSET=KDEADMIN
-- 
cgit v1.2.3