-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Accessing "invalid" URLs (the path doesn't match what we expect --eg. the version is not in the URL) makes addons to not load.
https://docs.readthedocs.com/platform/notfound/
In that URL, notfound
is detected as the version slug --which doesn't exist-- and the call to https://docs.readthedocs.com/_/addons/?client-version=0.43.0&api-version=1&project-slug=docs&version-slug=notfound fails with 404.
However, the call to https://docs.readthedocs.com/_/addons/?client-version=0.43.0&api-version=1&url=https://docs.readthedocs.com/platform/notfound/ (note that we are using url=
instead of project/version slug) and it works fine with 200 and returns versions.current: null
👍🏼
Note the version slug comes from X-RTD-Version: notfound
-- so, we may want to check the version exists before returning this header. However, I'm not sure what's the correct way to make this work.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status