radicale y infcloud funcionando

This commit is contained in:
2025-11-14 00:16:21 +01:00
parent 31c3de461b
commit 07af58a980
37 changed files with 297 additions and 1855 deletions
+7 -34
View File
@@ -18,39 +18,6 @@ server {
expires -1;
}
# Proxy para usuarios CalDAV/CardDAV - EXCLUIR archivos estáticos
location ~ ^/(?!(?:images|lib|css|js|fonts|locale|calendar|config\.js|index\.html|radicale)/)([a-zA-Z][a-zA-Z0-9_-]+)/ {
proxy_pass http://radicale:5232/$1/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Configuraciones de proxy para evitar truncamiento
proxy_buffering off;
proxy_request_buffering off;
proxy_http_version 1.1;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
# Headers WebDAV específicos
proxy_set_header Depth $http_depth;
proxy_set_header Destination $http_destination;
proxy_set_header Overwrite $http_overwrite;
# CORS headers para WebDAV
add_header Access-Control-Allow-Origin "*" always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, REPORT" always;
add_header Access-Control-Allow-Headers "Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Authorization, Destination, Overwrite" always;
add_header Access-Control-Expose-Headers "ETag, DAV" always;
add_header Access-Control-Allow-Credentials "true" always;
# Preflight requests
if ($request_method = OPTIONS) {
return 204;
}
}
# Proxy para Radicale según documentación oficial
location /radicale/ {
proxy_pass http://radicale:5232/;
@@ -58,6 +25,10 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Script-Name /radicale;
proxy_set_header X-Forwarded-Prefix /radicale;
proxy_set_header Authorization $http_authorization;
proxy_pass_request_headers on;
# Configuraciones de proxy para evitar truncamiento
proxy_buffering off;
@@ -65,6 +36,8 @@ server {
proxy_http_version 1.1;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
client_max_body_size 10M;
proxy_max_temp_file_size 0;
# Headers WebDAV específicos
proxy_set_header Depth $http_depth;
@@ -98,4 +71,4 @@ server {
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
}
}