-
-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Description
I'm running datasette serve --config base_url:/foo/ …, proxying to it with this Apache config:
ProxyPass /foo/ http://localhost:8001/
ProxyPassReverse /foo/ http://localhost:8001/
and then accessing it via https://example.com/foo/.
Although many of the URLs in the pages are correct (presumably because they either use absolute paths which include base_url or relative paths), the faceting and pagination links still use fully-qualified URLs pointing at http://localhost:8001.
I looked into this a little in the source code, and it seems to be an issue anywhere request.url or request.path is used, as these contain the values for the request between the frontend (Apache) and backend (Datasette) server. Those properties are primarily used via the path_with_… family of utility functions and the Datasette.absolute_url method.
Reactions are currently unavailable