Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-Forwarded-Prefix not supported #12399

Closed
de-code opened this issue Nov 10, 2018 · 11 comments
Closed

X-Forwarded-Prefix not supported #12399

de-code opened this issue Nov 10, 2018 · 11 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement needs info stale Ticket or PR with no recent activity

Comments

@de-code
Copy link

de-code commented Nov 10, 2018

Steps to reproduce

  1. Use a reverse proxy that maps /nextcloud to / (e.g. Traefik with PathPrefixStrip)
  2. The prefix will be available as the X-Forwarded-Prefix header

Expected behaviour

Generated URLs should respect the prefix, e.g. add /nextcloud

Actual behaviour

The provided prefix is ignored and assets use an URL without the prefix.
As a workaround the prefix can be added to the overwritewebroot config option.

e.g.

if (isset($_SERVER['HTTP_X_FORWARDED_PREFIX'])) {
  $CONFIG['overwritewebroot'] = $_SERVER['HTTP_X_FORWARDED_PREFIX'];
}
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #3161 (Support HHVM), #3805 (predis support), #3761 (PostgreSQL support), #2494 (Sqlite support), and #11964 (Forwarded ExpiredTokenException).

@kesselb kesselb added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jan 26, 2020
@szaimen
Copy link
Contributor

szaimen commented May 28, 2021

Is this Issue still valid? If not, please close this issue. Thanks! :)

@ghost
Copy link

ghost commented Jun 27, 2021

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Jun 27, 2021
@de-code
Copy link
Author

de-code commented Jun 27, 2021

Has anything relating to HTTP_X_FORWARDED_PREFIX / X-Forwarded-Prefix been added to the server? (I can't find anything in the code)
Do you believe that another header variable should be set by the reverse proxy?

@ghost ghost removed the stale Ticket or PR with no recent activity label Jun 27, 2021
@de-code
Copy link
Author

de-code commented Jun 27, 2021

In case it is helpful, someone compiled a list of feature requests / issues in other open source software: dotnet/aspnetcore#23263 (comment)

@szaimen
Copy link
Contributor

szaimen commented Jun 27, 2021

cc @nextcloud/server-triage is this feasible?

@ghost
Copy link

ghost commented Jul 27, 2021

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Jul 27, 2021
@de-code
Copy link
Author

de-code commented Jul 28, 2021

I understand it didn't get much activity. But what info is needed? I provided a workaround code snipped and there are a number of similar PRs in other projects.

@ghost ghost removed the stale Ticket or PR with no recent activity label Jul 28, 2021
@ghost
Copy link

ghost commented Aug 27, 2021

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Aug 27, 2021
@de-code
Copy link
Author

de-code commented Aug 29, 2021

Could someone please remove the needsinfo tag or advise what information is needed?

@ghost ghost removed the stale Ticket or PR with no recent activity label Aug 29, 2021
@ghost
Copy link

ghost commented Sep 28, 2021

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Sep 28, 2021
@ghost ghost closed this as completed Oct 12, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement needs info stale Ticket or PR with no recent activity
Projects
None yet
Development

No branches or pull requests

4 participants