-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Cookies: set samesite: Lax
by default
#8304
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
Changes from 1 commit
693551f
6eb5a8a
b77ca8c
2722fbf
ef72f26
1f3cc26
0de9386
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,14 +72,14 @@ and then click on :guilabel:`Search Analytics`. | |
API | ||
--- | ||
|
||
Search is exposed through our API that's proxied from the domain where your docs are being served. | ||
This is ``https://docs.readthedocs.io/_/api/v2/search`` for the ``docs`` project, for example. | ||
If you are using :doc:`/commercial/index` you will need to replace | ||
https://readthedocs.org/ by https://readthedocs.com/ in all the URLs used in the following examples. | ||
|
||
.. warning:: | ||
|
||
This API isn't stable yet, some small things may change in the future. | ||
|
||
.. http:get:: /_/api/v2/search/ | ||
.. http:get:: /api/v2/search/ | ||
|
||
Return a list of search results for a project, | ||
including results from its :doc:`/subprojects`. | ||
|
@@ -120,12 +120,12 @@ This is ``https://docs.readthedocs.io/_/api/v2/search`` for the ``docs`` project | |
|
||
.. code-tab:: bash | ||
|
||
$ curl "https://docs.readthedocs.io/_/api/v2/search/?project=docs&version=latest&q=server%20side%20search" | ||
$ curl "https://readthedocs.org/api/v2/search/?project=docs&version=latest&q=server%20side%20search" | ||
|
||
.. code-tab:: python | ||
|
||
import requests | ||
URL = 'https://docs.readthedocs.io/_/api/v2/search/' | ||
URL = 'https://readthedocs.org/api/v2/search/' | ||
params = { | ||
'q': 'server side search', | ||
'project': 'docs', | ||
|
@@ -140,7 +140,7 @@ This is ``https://docs.readthedocs.io/_/api/v2/search`` for the ``docs`` project | |
|
||
{ | ||
"count": 41, | ||
"next": "https://docs.readthedocs.io/api/v2/search/?page=2&project=read-the-docs&q=server+side+search&version=latest", | ||
"next": "https://readthedocs.org/api/v2/search/?page=2&project=read-the-docs&q=server+side+search&version=latest", | ||
"previous": null, | ||
"results": [ | ||
{ | ||
|
@@ -194,3 +194,7 @@ If you are using :ref:`private versions <versions:privacy levels>`, | |
users will only be allowed to search projects they have permissions over. | ||
Authentication and authorization is done using the current session, | ||
or any of the valid :doc:`sharing methods </commercial/sharing>`. | ||
|
||
Cookie sessions can be used only from the same domain as the API, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be explained more. What is the takeaway for a user? When should they use this URL instead? Presumably this should use a readthedocs.com example, where it's most necessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is under the "Authentication and authorization" section of this doc, the paragraph above explains this is for private versions. I have changed this paragraph to avoid mentioning cookies. |
||
we proxy the API from the domain where your docs are being served so you can use it. | ||
This is ``https://docs.readthedocs.io/_/api/v2/search`` for the ``docs`` project, for example. | ||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.