Serve RSS feeds through app with host rewrites
This commit is contained in:
parent
3f28e46ff6
commit
e7b00b4129
3 changed files with 121 additions and 12 deletions
12
README.md
12
README.md
|
|
@ -24,7 +24,7 @@ uv sync --all-groups
|
|||
uv run repub
|
||||
```
|
||||
|
||||
With no arguments, `uv run repub` starts the web UI in local dev mode and serves published feed files from `/feeds/...` out of `out/feeds/...`.
|
||||
With no arguments, `uv run repub` starts the web UI in local dev mode. The Python app serves published `.rss` files from `/feeds/...` out of `out/feeds/...`, and in dev mode it also serves non-RSS feed artifacts from the same tree.
|
||||
|
||||
By default the UI listens on `127.0.0.1:8080`. You can override that with `REPUBLISHER_HOST` and `REPUBLISHER_PORT`, or with:
|
||||
|
||||
|
|
@ -32,15 +32,17 @@ By default the UI listens on `127.0.0.1:8080`. You can override that with `REPUB
|
|||
uv run repub serve --host 0.0.0.0 --port 8080
|
||||
```
|
||||
|
||||
If you invoke the `serve` subcommand explicitly, use `--dev-mode` to expose published feeds directly from the Quart app:
|
||||
If you invoke the `serve` subcommand explicitly, use `--dev-mode` to expose non-RSS feed artifacts directly from the Quart app:
|
||||
|
||||
```sh
|
||||
uv run repub serve --dev-mode
|
||||
```
|
||||
|
||||
In `--dev-mode`, requests under `/feeds/...` are served from `out/feeds/...`.
|
||||
Requests for `/feeds/**/*.rss` are always handled by the Python app. It rewrites mirrored feed URLs on the fly by replacing the configured `Feed URL` origin with `https://<Host header>`.
|
||||
|
||||
In production, do not rely on Quart to serve published feeds. Configure the reverse proxy to serve `out/feeds/...` directly at `/feeds/...`.
|
||||
In `--dev-mode`, non-RSS requests under `/feeds/...` are served from `out/feeds/...`.
|
||||
|
||||
In production, keep `/feeds/**/*.rss` routed to the Python app. Non-RSS feed artifacts under `out/feeds/...` should still be served directly by the reverse proxy at `/feeds/...`.
|
||||
|
||||
Important: the admin UI has no built-in authentication. Keep it bound to localhost or put it behind a trusted network layer such as Tailscale.
|
||||
|
||||
|
|
@ -57,7 +59,7 @@ Operational notes:
|
|||
|
||||
- The default database path is `republisher.db`. Set `REPUBLISHER_DB_PATH` to use a different SQLite file.
|
||||
- Mirrored feeds are written under `out/feeds/<slug>/`.
|
||||
In production, expose `out/feeds/` directly from the reverse proxy at `/feeds/`.
|
||||
In production, route `/feeds/**/*.rss` to the Python app and expose the remaining `out/feeds/` artifacts directly from the reverse proxy at `/feeds/`.
|
||||
- `Feed URL` is used to generate absolute media URLs and `atom:link rel="self"` in exported feeds.
|
||||
- Job logs and stats artifacts are written under `out/logs/`.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue