Skip to content

Applied a little DRY to the redirect middleware #1053

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

Merged
merged 1 commit into from
Jan 30, 2018
Merged

Applied a little DRY to the redirect middleware #1053

merged 1 commit into from
Jan 30, 2018

Conversation

alexaandru
Copy link
Contributor

Tried to eliminate the repetition found in redirect middleware.

@codecov
Copy link

codecov bot commented Jan 27, 2018

Codecov Report

Merging #1053 into master will increase coverage by 1.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1053      +/-   ##
==========================================
+ Coverage   77.73%   78.82%   +1.09%     
==========================================
  Files          27       27              
  Lines        1922     1884      -38     
==========================================
- Hits         1494     1485       -9     
+ Misses        301      284      -17     
+ Partials      127      115      -12
Impacted Files Coverage Δ
middleware/redirect.go 86.27% <100%> (+26.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40cae83...981962a. Read the comment docs.

@vishr vishr self-requested a review January 30, 2018 03:51
@vishr vishr merged commit 2769113 into labstack:master Jan 30, 2018
@vishr
Copy link
Member

vishr commented Jan 30, 2018

@alexaandru thanks for your contribution 🎉

@alexaandru alexaandru deleted the simplify-redirect-middleware branch January 30, 2018 07:07
@alexaandru
Copy link
Contributor Author

I thank you @vishr for a really nice framework :) Cheers!

vishr pushed a commit that referenced this pull request Mar 12, 2018
Enhancements:
    Implemented Response#After()
    Dynamically add/remove proxy targets
    Rewrite rules for proxy middleware
    Add ability to extract key from a form field
    Implemented rewrite middleware
    Adds a separate flag for the 'http/https server started on' message (#1043)
    Applied a little DRY to the redirect middleware (#1053) and tests (#1055)
    Simplify dep fetching (#1062)
    Add custom time stamp format #1046 (#1066)
    Update property name & default value & comment about custom logger
    Add X-Requested-With header constant
    Return error of context.File in c.contentDisposition
    Updated deps
    Updated README.md

Fixes:

    Fixed Response#Before()
    Fixed #990
    Fix href url from armor to echo (#1051)
    Fixed #1054
    Fixed #1052, dropped param alias feature
    Avoid redirect loop in HTTPSRedirect middleware (#1058)
    Fix deferring body close in middleware/compress test (#1063)
    Cleanup code (#1061)
    FIX - We must close gzip.Reader, only if no error (#1069)
    Fix formatting (#1071)
    Can be a fix for auto TLS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants