juno icon indicating copy to clipboard operation
juno copied to clipboard

RPC CORS

Open adriantpaez opened this issue 3 years ago • 1 comments

Description

Currently, the HTTP RPC fails requests from browsers because of CORS. With these changes is possible to configure CORS.

Changes:

  • Two flags/options are added:
    • rpc-cors is a string of a comma-separated list of all authorized CORS origins

Types of changes

  • New feature (non-breaking change which adds functionality)

Testing

Requires testing: Yes

Did you write tests??: Yes, tests of the configuration file are updated.

Documentation

If this requires a documentation update, did you add one? Yes

adriantpaez avatar Sep 15 '22 18:09 adriantpaez

Codecov Report

Base: 92.84% // Head: 92.69% // Decreases project coverage by -0.15% :warning:

Coverage data is based on head (4190023) compared to base (c5cc557). Patch coverage: 7.14% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #408      +/-   ##
===========================================
- Coverage    92.84%   92.69%   -0.16%     
===========================================
  Files           67       67              
  Lines         7350     7363      +13     
===========================================
+ Hits          6824     6825       +1     
- Misses         519      531      +12     
  Partials         7        7              
Flag Coverage Δ
unittests 92.69% <7.14%> (-0.16%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/juno/juno.go 100.00% <ø> (ø)
internal/rpc/http.go 0.00% <0.00%> (ø)
pkg/jsonrpc/providers/http/provider.go 0.00% <0.00%> (ø)
cmd/juno/juno.go 86.36% <100.00%> (+0.31%) :arrow_up:

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

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

codecov[bot] avatar Sep 15 '22 18:09 codecov[bot]