New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serve external version through El Proxito #6434
Conversation
…nal-versions-proxito
Use a URL under El Proxito to serve PR version at: http://docs.domain.org/_/external/html/<project>/<pr-number>/<filename>
This setting is not needed anymore since we are serving PR docs under the same docs domain for the project.
This feels way cleaner than our previous approach. I really like it.
This is also blocked on shipping proxito, sadly. I think we could start routing /_/
from our docs domains to proxito if we wanted, that would let us ship this and the media downloads.
Also, the URL that it links to now is http://test-builds.community.dev.readthedocs.io/_/external/html/test-builds/13/index.html for me locally
Originally, this PR was serving PR builds at a different domain than the docs domain:
Then we decided that it could be good to serve it under the same domain as the docs:
Although, we realize that this is a potential security issue on projects with custom domains. |
d026eea
to
0b41a1f
Compare
f06859c
to
b556625
Compare
Due to a potential security issue when serving the PRs under the same domain of the docs (maybe a custom one), we need to serve them in a different domain than the real docs.
b556625
to
ac14a1d
Compare
This looks mergable to me now
We'll need to also change the nginx configs in prod to support this, but that's good since we can easily deploy and test this.
If I understand correctly, we can safely deploy these changes and they won't have any effect in production until we change the NGINX config file to start using El Proxito. In fact, after deploying this, it should be working in our So, I think we are good to merge this and safely deploy in the next deploy. |
Allow El Proxito to serve
EXTERNAL
versions.Before this PR, we were serving external version just by using an NGINX
proxy_pass
rule pointing to the Blob storage. This new behavior is cleaner but also required to serve these versions on corporate, since they require auth and El Proxito can handle it properly.Steps to test this PR
Import
readthedocs/test-builds
into your local instance:Then, open a Django shell and create an external version pointing to PR 13 in that repository:
Finally, trigger a build for that version:
At this point, you will be able to hit http://external-builds.community.dev.readthedocs.io/html/test-builds/13/index.html and see the documentation built from a PR properly.