-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Proxito v2: forcing a prefix on all proxito URLs, including /_/
#10181
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
Comments
I understand that these files don't work in other paths that are not the root one.
This looks to be the important path to me. It's handy to proxy just one path and call it a day, instead of two ( |
I know that's true by default. I think some of them you can define a path to with a meta tag, but generally they won't work, and users just won't get them.
Yea, I think proxying our internal stuff at the prefix sounds reasonable, if it's not hard to implement. I think it would just be somehow getting the |
I think changing the prefix for The only thing that worries me is if the |
Also, restricting |
The implementation was changed to a more limited feature, path prefixes, they are simpler, and can be exposed to users, since they are plain strings. Changes: - Renamed some variables to match our new standard names - The old implementation of this (urlconf) works together with the new implementation (current projects will continue to work). - The resolver and unresolver have been adapted to support the new path prefixes - `get_url_prefix` is meant to just get the prefix of the subproject, so it has been renamed to do just that. Tests are passing on .com :) There is also the question about what to do with the other views (the ones under`/_/`). Opened #10181 to talk about that, that feature can be implemented in another PR. And support for hiding the `language` component can also be implemented later #10307 Closes #7136
@stsewd Gotcha... I think asking users to also proxy that path to us makes sense, but I can imagine they might not love that idea... But I agree it would be great if all our code didn't need to understand a prefix, but I feel like we already have an API host concept in a number of places, and adding the prefix in there wouldn't be a ton of work, but it would be really nice if we could just simplify things. |
We have the |
Yea, I think if anyone is special-casing anything, they could do the entire That said, I don't think this is a super common use case, and we should talk to our customers who are doing subpaths to see if we can get them to proxy |
Yeah, I was thinking the same, having a namespace would be great, maybe we aren't too late for that, we can serve old paths under both prefixes, and add new paths under the new one only. |
@stsewd I don't want to do too many changes for these edge cases, at this point. We can imagine lots of issues, but overall we've only had a couple customers ask about them, so we should hopefully be able to find a way to work with them to get something reasonable without changing how out system works on custom domains. |
@stsewd I wonder if we can hack what nvidia needs in nginx or CF, so we can remove it from the application? |
We're moving forward with the nginx hack for now, and can do this for other customers as needed. |
With #10156, we can use custom paths when serving documentation, all other paths are left as is (since they are well-defined).
But the old implementation allows you to serve those under a prefix (by creating a custom urlconf at runtime). Should we support that as well? For me, changing the pattern of how docs are served and adding a prefix to everything are two different things. This is since a user may want to just change the paths of its documentation, but still have all other things at the top level, like
robots.txt
,sitemap.xml
, proxied APIs, etc. The main addition of supporting path prefixes in our application is that all generated links will have the proper suffix, so they always point to the correct path from where the documentation is served, there is no need for that for paths that aren't docs.So users can proxy all docs pages as is, and all other paths that aren't docs, like
/robots.txt
,/sitemap.xml
,/_/
proxy to our servers (or choose not to, but/_/
is kind of important), instead of allowing them to have/path-prefix/robots.txt
,/path-prefix/sitemap.xml
,/path-prefix/_/
. I think it makes sense to have this restriction.The need to prefix everything could be needed if they really want to scope everything under a path prefix, or if the
/_/
path collides with something else they have already defined.So, the question, should we support serving non-docs paths under a path prefix? If so, should this be an option people can opt-in instead of the default?
The text was updated successfully, but these errors were encountered: