-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update base path when access from server #234
Conversation
Reviewer's Guide by SourceryThis pull request updates the base path configuration for the application, affecting both the frontend and backend. It introduces a global path setting in the Vue.js configuration and modifies the server-side code to use a configurable base path. File-Level Changes
Tips
|
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.
Hey @lcduong - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
return redirect(f"https://{world.domain}/#token={token}") | ||
return redirect(f"https://{world.domain}{base_path}/#token={token}") | ||
|
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.
suggestion: Consider handling potential double slashes in URL construction
If base_path is empty or starts with a slash, this could potentially lead to double slashes in the URL. Consider using a URL joining function or method to handle this edge case more robustly.
from urllib.parse import urljoin
return redirect(urljoin(f"https://{world.domain}", f"{base_path}/#token={token}"))
Summary by Sourcery
Update the base path configuration for both the Vue.js frontend and Django backend to ensure consistent URL handling and asset referencing. This includes setting a global public path in the Vue.js config and using a configurable base path in Django for URL redirection.
Enhancements:
Deployment: