Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Preserving Source IP and webdav request conflict

未关闭
#734 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
apache, helm, kubernetes, nginx

调研方向

先从 issue 中展示的 ingress annotations 和 curl OPTIONS 请求开始,然后跟踪 ingress-nginx 如何处理发往 Nextcloud WebDAV 端点的 CORS 预检请求。完成的标准是确定一种配置:保留源 IP、保持 CORS 启用、将 OPTIONS 转发到后端,并返回预期的 WebDAV 标头。

由索引模型根据 Issue 内容生成。

描述

Describe your Issue

Hi,

I am trying to set up WebDAV for Zotero, but I am running into an issue with ingress and CORS settings.

  • The deployment uses image.flavor: apache.
  • I followed the recommended settings: preserve the source IP and support CORS.
  • My current ingress annotations:
ingress:
  annotations:
   nginx.ingress.kubernetes.io/enable-cors: "true"
   nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For"

With this config, when Zotero or I use an OPTIONS request (for WebDAV capability check), the response is processed directly by the ingress (HTTP 204), and the request does not reach the backend (Nextcloud).
As a result, Zotero cannot detect the WebDAV capabilities correctly, since the WebDAV-specific headers (like DAV:) are not provided as expected. Though I can correctly synchronize webdav files, zotero must firstly do this step for checking before synchronizing.

Here is the curl test:

···bash
curl -i -X OPTIONS https://NEXTCLOUD-URL/remote.php/dav/files/USERNAME
···
Output

HTTP/2 204
...
access-control-allow-methods: GET, PUT, POST, DELETE, PATCH, OPTIONS, PROPFIND, PROPPATCH, COPY, MOVE, LOCK, UNLOCK
access-control-allow-headers: X-Forwarded-For
...

Question:
How should I configure ingress-nginx so that:

  • CORS is enabled,

  • Source IP is preserved,

  • AND the OPTIONS/WebDAV capability requests are actually forwarded to the backend (not intercepted by the ingress), so the WebDAV headers are correctly returned?

Any help is much appreciated!

Describe your Environment

  • Kubernetes distribution: rke2

  • Helm Version (or App that manages helm): it's independent to helm version

  • Helm Chart Version: it's independent to helm chart version

  • values.yaml:

# paste your values.yaml (anonymize any sensitive data)

Additional context, if any

主要语言
Go Template
星标
536
派生
316
平均合并
4 天 16 小时
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/helm 的其他 Issue

查看 nextcloud/helm 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。