AdguardTeam / AdguardTeam/AdGuardHome

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

Đang mở
#6,604 8 bình luận 3 reaction 1 người được giao Được @Chinaski1 nhận Xem trên GitHub
compatibility documentation Priority: P4
Ngôn ngữ chính
TypeScript
Star
36.9k
Fork
2.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.