-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Proxito: use unresolved domain on middleware #9974
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
ping @humitos |
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 much cleaner implementation. I think it looks like yet another solid step forward in making this code cleaner.
"Proxito Public Domain -> Canonical Domain Redirect.", | ||
project_slug=project.slug, | ||
) | ||
request.canonicalize = constants.REDIRECT_CANONICAL_CNAME |
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.
These constants should probably be an enum as well, next refactor?
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.
Could be, but I think we could move this logic to the docs serving view, and we won't be needing those constants anymore
This is on my list. I'll try to review it on Monday, hopefully |
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.
I think we should update the name of the class and we are ready to merge 💯
I'll merge this after tomorrow's deploy (we have a pending PR that will conflict with the changes here) |
Make use of the unresolved domain from the request instead of each of the attributes we are setting in the request from the middleware, we aren't using any of those on .com, so we are safe removing them here. This is on top of #9974.
map_host_to_project
into_set_request_attributes
andunresolve_domain_from_request
UnresolvedDomain
data class to return from the unresolver.