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

fix: adapt to the scenario that the ConfigService sets context-path (#3316) #3320

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

nisiyong
Copy link
Member

What's the purpose of this PR

After setting context-path in ConfigService, the AccessKey feature went wrong.
This PR fixes such a scenario.

Which issue(s) this PR fixes:

Fixes #3316

Brief changelog

Replace request.getServletPath() with request.getRequestURI(), when ClientAuthenticationFilter get the request path from client.

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Read the Contributing Guide before making this pull request.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit tests to verify the code.
  • Run mvn clean test to make sure this pull request doesn't break anything.

@codecov-commenter
Copy link

Codecov Report

Merging #3320 into master will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3320      +/-   ##
============================================
- Coverage     51.49%   51.43%   -0.07%     
+ Complexity     2306     2302       -4     
============================================
  Files           442      442              
  Lines         13738    13738              
  Branches       1398     1398              
============================================
- Hits           7075     7066       -9     
- Misses         6175     6180       +5     
- Partials        488      492       +4     
Impacted Files Coverage Δ Complexity Δ
...nfigservice/filter/ClientAuthenticationFilter.java 91.30% <100.00%> (ø) 14.00 <0.00> (ø)
...rk/apollo/spring/property/SpringValueRegistry.java 83.33% <0.00%> (-5.56%) 10.00% <0.00%> (-1.00%)
...ework/apollo/internals/RemoteConfigRepository.java 86.25% <0.00%> (-3.13%) 24.00% <0.00%> (-1.00%)
.../framework/apollo/spring/property/SpringValue.java 87.71% <0.00%> (-1.76%) 20.00% <0.00%> (-1.00%)
...ervice/service/ReleaseMessageServiceWithCache.java 84.70% <0.00%> (-1.18%) 23.00% <0.00%> (-1.00%)

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 4d49504...d6a89d2. Read the comment docs.

Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

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

LGTM

@nobodyiam nobodyiam merged commit 849ad71 into apolloconfig:master Oct 2, 2020
@nisiyong nisiyong deleted the fix-issue-3316 branch October 2, 2020 11:04
@nobodyiam nobodyiam added this to the 1.8.0 milestone Feb 11, 2021
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.

K8S部署,configservice配置使用ingress转发,密钥校验失败
3 participants