-
-
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
redirect and CORS policies #11223
Comments
Hi, thanks for opening this issue. What would be needed on the Read the Docs side to support CORS on the redirect? |
Do we need |
@m-mohr Can you answer this ? |
Yes, as far as I know we need:
|
Not directly related to the topic about redirecting here, but for the original use case from PROJ that triggered this issue: I was wondering if readthedocs supports hosting some static files at a specific location, independent from the automated builds and related version / url scheme? I didn't directly find anything about this in the readthedocs documentation. But if not possible through readthedocs itself, does readthedocs still allow this to be done by the person managing the proj.org server/domain? (or do the redirects conflict with that?) |
If I understand correctly, what you want is to remove the "language" part from the URL? Is that correct? If that's the case, the documentation about this is at https://docs.readthedocs.io/en/stable/versioning-schemes.html |
Not exactly, what I meant is: for a project that is using the "multiple versions with/without translations" scheme, i.e. where URLs for the documentation artifacts start with eg |
No, it's not possible to host files outside of the documentation versions. |
I added these headers to your project's domain:
I checked with the links from the original description and both return the same response now. I'm closing this issue, but let me know any feedback you may have and we can reopen the issue if required. |
* HTTPheader: add another option Required by #11223 * Add missing migration
Details
Issue
We have setup an "exact redirect" from
/schemas/*
to/en/latest/schemas/:splat
using HTTP 302.so that URLs like https://proj.org/schemas/v0.7/projjson.schema.json get resolved to https://proj.org/en/latest/schemas/v0.7/projjson.schema.json
However the "from" URL cannot be used in context where CORS is needed
https://www.test-cors.org/#?client_method=GET&client_credentials=false&server_url=https%3A%2F%2Fproj.org%2Fschemas%2Fv0.7%2Fprojjson.schema.json&server_enable=true&server_status=200&server_credentials=false&server_tabs=remote returs a "Fired XHR event: error"
whereas https://www.test-cors.org/#?client_method=GET&client_credentials=false&server_url=https%3A%2F%2Fproj.org%2Fen%2Flatest%2Fschemas%2Fv0.7%2Fprojjson.schema.json&server_enable=true&server_status=200&server_credentials=false&server_tabs=remote works with "Fired XHR event: load"
Is there a way to setup a redirect that is CORS friendly? Or replicate content that is under the /en/latest/foo/bar hierarchy as non-versioned content at top level /foo/far in a non-redirected way?
This is related to OSGeo/PROJ#4088
The text was updated successfully, but these errors were encountered: