Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Allow CORS Configuration Via Config File #321

Merged
merged 2 commits into from
Mar 9, 2019
Merged

Conversation

bonedaddy
Copy link
Contributor

👷 Purpose

Instead of having to update the cors allowed origins and recompile, provide it with the config file.
Needs RTradeLtd/config#25 merged first

🚀 Changes

  • When building the api middleware, check to see if CORS have been provided, otherwise use sane defaults.
  • When loading the CORS middleware, we provide the origins we want to allow

⚠️ Breaking Changes

None

@bonedaddy bonedaddy added the status:review Pending review label Mar 8, 2019
@bonedaddy bonedaddy requested a review from bobheadxi March 8, 2019 11:17
@codecov
Copy link

codecov bot commented Mar 8, 2019

Codecov Report

Merging #321 into master will decrease coverage by 0.02%.
The diff coverage is 57.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #321      +/-   ##
==========================================
- Coverage   53.14%   53.12%   -0.01%     
==========================================
  Files          41       41              
  Lines        3700     3705       +5     
==========================================
+ Hits         1966     1968       +2     
- Misses       1331     1332       +1     
- Partials      403      405       +2
Impacted Files Coverage Δ
api/middleware/cors.go 100% <100%> (ø) ⬆️
api/v2/api.go 85.2% <50%> (-0.69%) ⬇️

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 d143b0c...447012d. Read the comment docs.

@bonedaddy bonedaddy merged commit 96995bf into master Mar 9, 2019
@bonedaddy bonedaddy deleted the api/cors#config branch March 9, 2019 07:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:review Pending review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants