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

Allow prefix multiplexing behind reverse proxy #2319

Merged
merged 4 commits into from
Mar 22, 2025
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Mar 2, 2025

What does this implement/fix?

Add new config option webserver.paths.prefix allowing Pi-hole's dashboard and API to be used behind a reverse proxy with path prefix multiplexing. This was already possible in Pi-hole v5.0 without having been added intentionally at any point. It is debatable whether this is a new feature or a bug (because it used to work like this pre-v6.0).

A self-contained docker-compose.yml suitable for testing this can be found in #2298

Note

You will need the related web branch new/web_prefix for this to work as expected.


Related issue or feature (if applicable): Fixes #2298

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

DL6ER added a commit to pi-hole/web that referenced this pull request Mar 2, 2025
…oard and API to be used behind a reverse proxy with path prefix multiplexing.

Signed-off-by: DL6ER <[email protected]>
Copy link

github-actions bot commented Mar 3, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

github-actions bot commented Mar 9, 2025

Conflicts have been resolved.

@DL6ER DL6ER marked this pull request as ready for review March 9, 2025 19:02
@DL6ER DL6ER requested a review from a team March 9, 2025 19:02
@yubiuser
Copy link
Member

yubiuser commented Mar 9, 2025

Test failed.

@dschaper
Copy link
Member

dschaper commented Mar 9, 2025

Test failed.

Looks like buildx failures. Triggered a rerun of the failed tests.

@dschaper
Copy link
Member

dschaper commented Mar 9, 2025

I think the problem is that the builds try to upload debug logs to docker-2 and the debug logs are massive and that causes ansi2html to blow up because it runs gawk on the files and overloads the CPU on docker-2. The ansi2html gets killed and that is seen as a failure?

@yubiuser
Copy link
Member

yubiuser commented Mar 9, 2025

No, they really fail. This PR added a new config option, but the the test were not adjusted.

#9 56.25   1/208 ✗ Compare template and test TOML config files
#9 56.32    (in test file test/test_suite.bats, line 8)
#9 56.32      `[[ "${lines[@]}" == "" ]]' failed
#9 56.32    --- /dev/fd/63
#9 56.32    +++ /dev/fd/62
#9 56.32    @@ -1194,7 +1194,7 @@
#9 56.32       all = true ### CHANGED, default = false
#9 56.32    
#9 56.32     # Configuration statistics:
#9 56.32    -# 154 total entries out of which 97 entries are default
#9 56.32    +# 155 total entries out of which 98 entries are default
#9 56.32     # --> 57 entries are modified
#9 56.32     # 3 entries are forced through environment:
#9 56.32     #   - misc.nice

@DL6ER
Copy link
Member Author

DL6ER commented Mar 10, 2025

As, yes, sorry. This frequently happens when we merge development which added another seeing as well. git merge things the change to that counter is now already done, it doesn't know if needs to be incremented further now. I'll fix this after work

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

Conflicts have been resolved.

@DL6ER DL6ER merged commit bc319f7 into development Mar 22, 2025
19 checks passed
@DL6ER DL6ER deleted the new/web_prefix branch March 22, 2025 19:47
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pihole-nginx-not-working/78511/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants