-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Changes on 404, robots, and sitemap #6798
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
Conversation
@@ -323,7 +322,7 @@ def get(self, request, project): | |||
include_file=False, | |||
version_type=self.version_type, | |||
) | |||
path = os.path.join(storage_path, 'robots.txt') | |||
path = f'{storage_path}/robots.txt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't use path.join for storage paths, there are more in this file
Should we wait until we are fully on El Proxito to merge this? (we are really close to that) |
Don't think is necessary, I mean, there isn't a big difference from what we have and these changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good change 👍
@@ -266,14 +264,17 @@ def get(self, request, proxito_path, template_name='404.html'): | |||
if default_version_slug != version_slug: | |||
versions.append(default_version_slug) | |||
for version_slug_404 in versions: | |||
if not self.allowed_user(request, final_project, version_slug_404): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. This is going to add even more queries to our slow 404's. I'm a bit worried about that. I guess it won't cause a query on the .org, which is where i'm most worried about it, so it should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, on .org that function just returns True, it doesn't query the db.
This PR is needed in .com to math this changes https://github.com/readthedocs/readthedocs-corporate/pull/875 |
These changes aren't ported to the serve app, only on proxito. There is a PR on .com adapting the code to this new changes.
Ref #6194