-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Proxito: refactor doc serving #9726
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
9f5061e
to
a250642
Compare
a250642
to
d7f6155
Compare
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 is really good! 💯
I understand that there weren't logic changes here and most of it is moving code from one place to another. So, I didn't go too deep into reviewing the logic and everything. I trust on our test suite and in you 😄
I left some comments that will improve the reading of this code next time we have to deal with it and also ideas to apply some simplifications. Let me know what you think about them.
Serve from the filesystem if using ``PYTHON_MEDIA``. We definitely | ||
shouldn't do this in production, but I don't want to force a check for | ||
``DEBUG``. |
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 should probably kill PYTHON_MEDIA
now that we have all the set ups using Docker with NGINX 😄
This is so it's easier to share this code with the new implementation.
_serve_file
method, to serve any file from storage, and 3 high level methods to serve files from docs, static files, or downloads.