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

Cors domain filter #715

Merged
merged 8 commits into from
Apr 26, 2019
Merged

Cors domain filter #715

merged 8 commits into from
Apr 26, 2019

Conversation

melowe
Copy link
Contributor

@melowe melowe commented Apr 25, 2019

Includes moving filter creation for common filters into jersey server module.

response filtering only to 3rd party server only.
# Conflicts:
#	jaxrs-service/src/main/java/com/quorum/tessera/api/filter/LoggingFilter.java
jersey. Add CORS filter but still pending confirmation on matching 
logic.
- match wildcards
- match exact matches. 

Add defaults for additional cors configs and pass through to headers.
@melowe melowe marked this pull request as ready for review April 26, 2019 12:45
@codecov-io
Copy link

codecov-io commented Apr 26, 2019

Codecov Report

Merging #715 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #715   +/-   ##
=========================================
  Coverage     99.49%   99.49%           
  Complexity     1879     1879           
=========================================
  Files           287      286    -1     
  Lines          5583     5583           
  Branches        282      281    -1     
=========================================
  Hits           5555     5555           
  Misses            5        5           
  Partials         23       23
Impacted Files Coverage Δ Complexity Δ
...rum/tessera/thridparty/RawTransactionResource.java 100% <ø> (ø) 3 <0> (ø) ⬇️
...n/java/com/quorum/tessera/config/ServerConfig.java 100% <100%> (ø) 25 <2> (+2) ⬆️
...a/com/quorum/tessera/service/ServiceContainer.java 100% <100%> (ø) 7 <0> (ø) ⬇️
...a/com/quorum/tessera/config/CrossDomainConfig.java 100% <100%> (ø) 9 <9> (?)

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 4258982...b949155. Read the comment docs.

@@ -39,12 +53,22 @@ public void onTearDown() throws Exception {

@Test
public void ping() {

MultivaluedMap<String, Object> headers = new MultivaluedHashMap<>();
headers.add("Origin", "*.acme.com");
Copy link
Contributor

Choose a reason for hiding this comment

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

wow - I was not expecting wildcards in the Origin header... I would always have expected that the Origin is exactly the site name from where the script attempting the CORS request has been downloaded.

@Krish1979 Krish1979 merged commit 2bffa24 into master Apr 26, 2019
@melowe melowe deleted the cors_domain_filter branch April 26, 2019 14:33
@prd-fox prd-fox added 0.10.0 feature User features labels Apr 29, 2019
@prd-fox
Copy link
Contributor

prd-fox commented May 3, 2019

Linked issue: #709

@Krish1979 Krish1979 added 0.9.3 and removed 0.10.0 labels Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.9.3 feature User features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants