AdguardTeam / AdguardTeam/AdGuardHome

Redirect to login.html is incorrect when using a reverse proxy

Aperta
#6,604 8 commenti 3 reazioni 1 assegnatario Rivendicata da @Chinaski1 Vedi su GitHub
compatibility documentation Priority: P4
Lingua principale
TypeScript
Stelle
36.9k
Fork
2.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Prerequisites

- [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) and found no answer

- [X] I have searched other issues and found no duplicates

- [X] I want to report a bug and not [ask a question or ask for help](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a)

- [X] I have set up AdGuard Home correctly and [configured clients to use it](https://github.com/AdguardTeam/AdGuardHome/wiki/Clients). (Use the [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) for help with installing and configuring clients.)

### Platform (OS and CPU architecture)

FreeBSD, AMD64 (aka x86_64)

### Installation

Custom package (OpenWrt, HomeAssistant, etc; please mention in the description)

### Setup

On one machine

### AdGuard Home version

0.107.36

### Action

When using AdGuard Home behind a reverse proxy (Apache 2.4 in this case), unauthenticated users are redirected to `/login.html`, which causes issues when placed behind a subdirectory. The naive fix for this would be a relative redirect (eg. `login.html`.

My Apache configuration (which should be equivalent to the documented nginx configuration) is:
```
ProxyPreserveHost On
ProxyPass /adguard/ http://localhost:3000/
ProxyPassReverse /adguard/ http://localhost:3000/
ProxyPassReverseCookiePath /adguard/ /
```

Thanks in advance!

### Expected result

Redirects work when using a reverse proxy from a subdirectory (eg. `/adguard/login.html`).

### Actual result

An absolute redirect to `/login.html` is performed.

### Additional information and/or screenshots

FreeBSD 13.2-RELEASE-p9; installed using the `www/adguardhome` port.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.