-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Use different setting for footer api url #6131
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
Conversation
Currently we use 'api_host' in our js to call the footer api. I'm making a separate setting just for the footer api. This is to allow us to proxy the footer api from the same domain that is serving the docs (this is useful for .com). We can't proxy the whole api from the serve app because there are some places where we call `reverse`, and on the serve app we don't have access to all urls (like project dashboard). We need to publish the sphinx-extension with this change first.
I don't like a one-off setting like this. I'd much prefer a pattern that is more generic that we can move to over time. I think something like |
@ericholscher done. PR for the sphinx-ext readthedocs/readthedocs-sphinx-ext#77 Note: the ext should be released first, otherwise it wouldn't set the |
If I understand correctly, the idea here is to hit the endpoint of the I'm thinking that
|
@humitos yes is to hit the api from the serve instance. For .org it would point to the public api on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good.
It would be good to have some explanation in code comments about this because it's hard to differentiate api_host
and proxied_api_host
just reading the code.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks 💯
We need to wait to merge this until the backend is working, correct? Edit: I guess not, since it defaults to RTD.org, so it should keep working. |
Co-Authored-By: Eric Holscher <[email protected]>
@ericholscher this one can be reviewed/merged now readthedocs/readthedocs-sphinx-ext#77 |
Currently we use 'api_host' in our js to call the footer api.
I'm making a separate setting just for the footer api.
This is to allow us to proxy the footer api from the same domain that
is serving the docs (this is useful for .com).
We can't proxy the whole api from the serve app because there are some
places where we call
reverse
, and on the serve app we don't haveaccess to all urls (like project dashboard).
We need to publish the sphinx-extension with this change first.
Are we ok with this? Other option is to pass the whole endpoint (including
/api/v2/footer_html/
)