-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Forced redirect /$rest -> example.com
redirects PR previews (external domain) to target domain
#9614
Comments
Hi, this looks like a side effect of the exact redirect that the project has in place.
That redirect will redirect all requests to the docs.xarray.dev domain, but in this case it should stay in https://xray--7061.org.readthedocs.build/en/7061/, which is the domain for serving PR previews. One way to solve this would be to create that redirect only for the active versions on https://readthedocs.org/projects/xray/versions/, i.e Another way would be for us to support matching the domain in the redirect, this is
|
And other solution could be to ignore user redirects when serving PR previews. |
/$rest -> example.com
redirects PR previews (external domain) to target domain
this solution appears to be working for us 🎉 . Thank you, @stsewd! |
Actually, I'm not sure it is working. https://xarray.pydata.org/en/stable/api.html is no longer redirecting to https://docs.xarray.dev/en/stable/api.html as expected. |
Good catch... Forgot to check this |
Sorry, I meant that those solutions we could implement in the future, that's not currently supported. |
This will be fixed with #10881. We decided to not run user redirects on previews from PRs, those domains should be treated as temporary. |
@stsewd do we have this decision documented somewhere? If not, I think it will be good for users and also for ourselves. |
It's in the documentation and design document. https://docs.readthedocs.io/en/latest/user-defined-redirects.html#limitations-and-observations |
Details
Expected Result
Pull Request preview to work when using custom domain.
Actual Result
We recently switched to using a custom domain for our docs on RTD docs.xarray.dev, and this appears to have broken the pull request preview feature (or this doesn't seem to work for us at least). For instance, The GitHub check for this PR: pydata/xarray#7061 points to https://docs.xarray.dev/en/7061/. This page returns a 404
Cc @jhamman
The text was updated successfully, but these errors were encountered: