-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Interacting with the Sphinx Generated Docs from the Landing Page #216
Comments
I don't know what CORS is but is it the kind of thing that we could ask RTD to implement for us? @adrn , thoughts? |
As far as I know, enabling CORS(Cross-Origin Resource Sharing) is not a good practice since allowing other websites to do HTTP calls from JavaScript (what we call) can be a security issue; so it's possible that RTD may not agree to our request. Maybe we can ask them to whitelist our particular domain, but still, that depends on them. Let's see what @adrn has to say. Meanwhile I'll brainstorm for better alternatives. Using a simple flask based server can be an option. |
Yeah, let's not get too fancy there with JS lest browser starts blocking it due to suspected security risk... |
Problem is If we host a backend(flask or something, to make the HTTP Request), then We will need to deploy it somewhere(Heroku or Digital Ocean). Is that possible? |
Hi @kelle @adrn The Front end makes a call to a flask server hosted by me on Heroku (learn-astropy.herokuapp.com) which in turn makes a call to RTD. CORS issue solved. Note: It is only for testing purposes, so the filter on the left is not functional. Also I am fetching information from Documentation as of now, not from Tutorials and Examples. |
I was dabbling with the dynamic search integration of the Sphinx Generated pages with the landing page for the learn astropy website. [Issue #203]
I figured out that we can directly make request to Read the Docs to get search results, corresponding to our query (which is plot, in the example URL stated above). But Read the Docs has disabled CORS. So I can’t make a request directly from the frontend.
There’re 2 possible solutions, I am looking at:
I’d like to have suggestions on how shall I proceed.
The text was updated successfully, but these errors were encountered: