Skip to content

.htaccess does not handle HTTPS .well_known redirects properly, when running behind a reverse proxy #22375

@gjoliver

Description

@gjoliver

Steps to reproduce

  1. Configure a reverse proxy in front of your Nextcloud installation for terminating HTTPS requests.
  2. Use Chrome browser and go to Settings -> Overview page.
  3. See the warnings about .well_known redirects not properly set up.

Expected behaviour

.htaccess should redirect to HTTPS URLs when x-forwarded-proto header is https.

Actual behaviour

Instead, .htaccess always redirect to HTTP urls today, since it doesn't respect the x-forwarded-proto header.

Server configuration

RancherOS
Custom Reverse Proxy
MariaDB, Redis
nextcloud:18.0.3-apache docker image, freshly install.
Chrome Browser

A working fix was proposed and shot down here: #22084
The PR thread contains tons of good context and discussion about the problem, and why I think it was the right fix.
Hopefully useful if anyone wants to pick this issue up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions