Skip to content

allow proxy middleware to pass rewritten query part (fix #1798) - #1802

Merged
lammel merged 2 commits into
labstack:masterfrom
aldas:fix_1798_proxy_question_mark
Mar 9, 2021
Merged

lammel merged 2 commits into
labstack:masterfrom
aldas:fix_1798_proxy_question_mark

Conversation

@aldas

@aldas aldas commented Mar 8, 2021 •

Copy link
Copy Markdown
Contributor

Alow proxy middleware to pass rewritten query part (fix #1798)

@codecov

codecov Bot commented Mar 8, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #1802 (a8f02c8) into master (a97052e) will decrease coverage by 0.19%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1802      +/-   ##
==========================================
- Coverage   89.68%   89.49%   -0.20%     
==========================================
  Files          32       32              
  Lines        2676     2684       +8     
==========================================
+ Hits         2400     2402       +2     
- Misses        178      181       +3     
- Partials       98      101       +3     
Impacted Files Coverage Δ
middleware/proxy.go 60.46% <0.00%> (-1.89%) ⬇️
middleware/rewrite.go 64.70% <0.00%> (-11.77%) ⬇️
middleware/middleware.go 94.44% <88.88%> (-5.56%) ⬇️

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 a97052e...a8f02c8. Read the comment docs.

Comment thread middleware/middleware.go Resolved

@lammel lammel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You thought of more tests then I did definitely ;-)
Please add the comment as requested just to note that the leftmost part of the URL will be trimmed if replacement and original URL share the same prefix.

Approved. Feel free to merge.

@lammel

lammel commented Mar 9, 2021

Copy link
Copy Markdown
Contributor

As noted in #1798 the problem is resolved with this PR.
Comment added, so merging.

@lammel
lammel merged commit 4c2fd1f into labstack:master Mar 9, 2021
@aldas
aldas deleted the fix_1798_proxy_question_mark branch May 23, 2021 06:07
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.

How to escape question mark in proxy rewrite

2 participants