Support flexible base paths and thin proxies

This commit is contained in:
Codex
2026-07-08 06:38:41 +00:00
parent bbe7b6f562
commit 49e9f5e640
10 changed files with 233 additions and 29 deletions
+25
View File
@@ -17,6 +17,7 @@ cp .env.example .env
```
Edit `/root/compose/aishare/.env` and set `AISHARE_ADMIN_TOKEN`.
Keep `AISHARE_BASE_PATH=/aishare` for the legacy `xcel.me/aishare` endpoint.
Start:
@@ -55,3 +56,27 @@ Reload nginx:
nginx -t
docker exec nginx nginx -s reload
```
## Proxying From Other Hosts Or Paths
The app does not require a fixed hostname. Reader pages use relative links, and the admin UI derives API and share URLs from the browser's current URL.
For direct serving, set the app mount explicitly:
```env
AISHARE_BASE_PATH=/
```
or:
```env
AISHARE_BASE_PATH=/services/aishare
```
For thin proxy servers that should forward to this origin, use the compose stack in [`../proxy`](../proxy). It can expose URLs such as:
- `https://aishare.domain.com/`
- `https://domain.com/services/aishare/`
- `https://xcel.me/aishare/`
while forwarding to an origin such as `https://x1.xcel.me/aishare/`.