server { listen 5233; location / { if ($request_method = OPTIONS) { add_header Access-Control-Allow-Origin "http://100.114.8.119:8080" always; add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, PROPFIND, PROPPATCH, REPORT, OPTIONS, MKCOL, MKCALENDAR, COPY, MOVE" always; add_header Access-Control-Allow-Headers "Authorization, Content-Type, Depth, Prefer, If-Match, If-None-Match" always; add_header Access-Control-Expose-Headers "ETag, DAV, Allow" always; return 204; } add_header Access-Control-Allow-Origin "http://100.114.8.119:8080" always; add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, PROPFIND, PROPPATCH, REPORT, OPTIONS, MKCOL, MKCALENDAR, COPY, MOVE" always; add_header Access-Control-Allow-Headers "Authorization, Content-Type, Depth, Prefer, If-Match, If-None-Match" always; add_header Access-Control-Expose-Headers "ETag, DAV, Allow" always; proxy_pass http://host.docker.internal:5232; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header Authorization $http_authorization; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }