-
Notifications
You must be signed in to change notification settings - Fork 4
fix(hsts): exposed RedirectStatusCode #70
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
Reviewer's Guide by SourceryExposed the redirect status code used in the HSTS redirect middleware to allow for configuration. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Here's the code health analysis summary for commits Analysis Summary
|
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 @cnlangzi - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider making the redirect status code configurable via an option passed into the
Redirect
function instead of using a global variable.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 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 and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
=======================================
Coverage 91.28% 91.28%
=======================================
Files 62 62
Lines 2490 2490
=======================================
Hits 2273 2273
Misses 188 188
Partials 29 29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Changed
RedirectStatusCode
Fixed
Added
Tests
Tasks to complete before merging PR:
make unit-tests
to check for any regressions 📋make lint
to check for any issuesSummary by Sourcery
Update the HSTS redirect middleware to use a 301 status code by default and allow customization.
Enhancements:
RedirectStatusCode
variable for the HSTS redirect middleware.