nextcloud / nextcloud/helm

Running this chart configured with nginx causes incorrect redirects and CSP errors

Open
#560 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Go Template
Stars
534
Forks
314
Avg merge
42m
Merged PRs (30d)
1

Description

Describe your Issue

When running this chart with nginx enabled, URIs without an ending "/" will cause nginx to redirect with a 301 to "http" instead of "https" (this is of course assuming that you have a reverse proxy serving https as well).

Nginx is the part that is causing this redirect, and it seems like this is solved by adding "absolute_redirect off;" in the server section in the nginx configuration. I would gladly open a PR for this, but I'm not knowledgeable enough about the project to know if this is the best solution.

This issue appears most clearly when trying to enable/disable apps, which will cause a request to https://server/apps/files, which gets incorrectly redirected to http://server/apps/files/

Logs and Errors

Describe your Environment

  • Kubernetes distribution: k3s

  • Helm Version (or App that manages helm):

  • Helm Chart Version:

  • values.yaml:

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

Additional context, if any

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file or test; start by locating the chart's nginx server configuration and reproducing a request such as https://server/apps/files without a trailing slash behind an HTTPS reverse proxy. Verify the redirect preserves HTTPS and investigate the reported CSP errors, then confirm the behavior with nginx enabled and the relevant Helm values.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, nginx
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.