gin-contrib / cors

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

Alloworigins #46

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

:exclamation: No coverage uploaded for pull request base (new@764baef). Click here to learn what that means. The diff coverage is 95.58%.

Impacted file tree graph

@@          Coverage Diff           @@
##             new      #46   +/-   ##
======================================
  Coverage       ?   93.02%           
======================================
  Files          ?        3           
  Lines          ?      172           
  Branches       ?        0           
======================================
  Hits           ?      160           
  Misses         ?       11           
  Partials       ?        1
Impacted Files Coverage Δ
config.go 100% <100%> (ø)
utils.go 100% <100%> (ø)
cors.go 81.53% <92.5%> (ø)

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 764baef...51fe3ba. Read the comment docs.