Browse Source

cors add bilingo

Paul 4 years ago
parent
commit
585daebc3a
7 changed files with 13 additions and 1 deletions
  1. 2
    0
      middleware/auth/go.mod
  2. 1
    1
      middleware/cors/cors.go
  3. 2
    0
      middleware/cors/go.mod
  4. 2
    0
      notice/go.mod
  5. 2
    0
      request/go.mod
  6. 2
    0
      timeout/go.mod
  7. 2
    0
      utils/go.mod

+ 2
- 0
middleware/auth/go.mod View File

@@ -12,3 +12,5 @@ require (
12 12
 	gopkg.in/go-playground/validator.v8 v8.18.2 // indirect
13 13
 	gopkg.in/yaml.v2 v2.2.1 // indirect
14 14
 )
15
+
16
+go 1.13

+ 1
- 1
middleware/cors/cors.go View File

@@ -20,7 +20,7 @@ func Cors() gin.HandlerFunc {
20 20
 			return true
21 21
 		}
22 22
 
23
-		if strings.Contains(origin, "links123.com") {
23
+		if strings.Contains(origin, "bilingo.com") || strings.Contains(origin, "links123.com") {
24 24
 			return true
25 25
 		}
26 26
 

+ 2
- 0
middleware/cors/go.mod View File

@@ -10,3 +10,5 @@ require (
10 10
 	gopkg.in/go-playground/validator.v8 v8.18.2 // indirect
11 11
 	gopkg.in/yaml.v2 v2.2.1 // indirect
12 12
 )
13
+
14
+go 1.13

+ 2
- 0
notice/go.mod View File

@@ -1 +1,3 @@
1 1
 module git.links123.net/links123.com/pkg/notice
2
+
3
+go 1.13

+ 2
- 0
request/go.mod View File

@@ -20,3 +20,5 @@ require (
20 20
 	gopkg.in/go-playground/validator.v8 v8.18.2 // indirect
21 21
 	gopkg.in/yaml.v2 v2.2.1 // indirect
22 22
 )
23
+
24
+go 1.13

+ 2
- 0
timeout/go.mod View File

@@ -1 +1,3 @@
1 1
 module git.links123.net/links123.com/pkg/timeout
2
+
3
+go 1.13

+ 2
- 0
utils/go.mod View File

@@ -1 +1,3 @@
1 1
 module git.links123.net/links123.com/pkg/utils
2
+
3
+go 1.13