sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
552 stars 84 forks source link

Feature Request: Proxy Support #184

Open ryanewtaylor opened 1 week ago

ryanewtaylor commented 1 week ago

My help documentation, served at http://localhost:3000/ needs to make fetches to external resources via relative paths, in different environments (i.e., dev, integration, staging, and production). It would be very helpful to support proxying during local dev with sphinx-autobuild so that I can redirect requests the relative requests to the appropriate endpoint. I am thinking something similar to what webpack dev server does.

--proxy="context:'/rel/url1' target='/target/url1' secure=false"
--proxy="context:'/rel/url2' target='/target/url2' secure=true"
--proxy="context:'/rel/url3' target='/target/url3' secure=false"