gin-contrib / cors

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

Added chrome-extension:// origin support #40

Closed Rickerd0613 closed 6 years ago

Rickerd0613 commented 6 years ago

Allowing only *, http, and https in allowed origins prevents users from allowing Chrome Extensions without using AllowOriginFunc. This change allows entires with the prefix chrome-extension:// to be allowed.

codecov-io commented 6 years ago

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #40   +/-   ##
=======================================
  Coverage   91.12%   91.12%           
=======================================
  Files           3        3           
  Lines         124      124           
=======================================
  Hits          113      113           
  Misses         11       11
Impacted Files Coverage Δ
cors.go 65.51% <100%> (ø) :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 6653abe...bc67869. Read the comment docs.

appleboy commented 6 years ago

fixed in https://github.com/gin-contrib/cors/pull/43