Skip to content
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

issues/168: Add ReloadProtector middleware #171

Merged
merged 11 commits into from
Oct 26, 2022
Merged

issues/168: Add ReloadProtector middleware #171

merged 11 commits into from
Oct 26, 2022

Conversation

komuw
Copy link
Owner

@komuw komuw commented Oct 26, 2022

What:

  • Add a middleware that attempts to provides protection against a form re-submission when a user reloads/refreshes an already submitted web page/form.
    If such a situation is detected; this middleware will issue a http GET redirect to the same url.

Why:

@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2022

Codecov Report

Base: 71.34% // Head: 71.87% // Increases project coverage by +0.53% 🎉

Coverage data is based on head (27b4394) compared to base (91e474d).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
+ Coverage   71.34%   71.87%   +0.53%     
==========================================
  Files          30       31       +1     
  Lines        2066     2105      +39     
==========================================
+ Hits         1474     1513      +39     
  Misses        518      518              
  Partials       74       74              
Impacted Files Coverage Δ
middleware/middleware.go 100.00% <100.00%> (ø)
middleware/reload_protect.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@komuw komuw changed the title issues/168: issues/168: Add ReloadProtector middleware Oct 26, 2022
@komuw komuw marked this pull request as ready for review October 26, 2022 12:36
@komuw komuw merged commit 9e10769 into main Oct 26, 2022
@komuw komuw deleted the issues/168 branch October 26, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

protect against form re-submissions when page is refreshed
2 participants