gin-contrib / cors

Official CORS gin's middleware
https://gin-gonic.github.io/gin/
MIT License
1.79k stars 186 forks source link

If "*" value is present in the list, all origins will be allowed. #47

Closed billyplus closed 5 years ago

billyplus commented 5 years ago

According to godoc

// AllowedOrigins is a list of origins a cross-domain request can be executed from.
// If the special "*" value is present in the list, all origins will be allowed.

This feature is missing. So this pull request is about to fix it.

codecov-io commented 5 years ago

Codecov Report

Merging #47 into master will increase coverage by 0.12%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #47      +/-   ##
==========================================
+ Coverage   92.89%   93.02%   +0.12%     
==========================================
  Files           3        3              
  Lines         169      172       +3     
==========================================
+ Hits          157      160       +3     
  Misses         11       11              
  Partials        1        1
Impacted Files Coverage Δ
cors.go 81.53% <100%> (+0.89%) :arrow_up:

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 488de3e...51fe3ba. Read the comment docs.