Support flexible base paths and thin proxies
This commit is contained in:
@@ -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/`.
|
||||
|
||||
Reference in New Issue
Block a user