cors
This commit is contained in:
parent
d114d7d0f6
commit
258d8d3816
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -189,7 +189,7 @@ func notify(jsonResponse string) {
|
||||||
func main() {
|
func main() {
|
||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
router.Use(cors.New(cors.Config{
|
router.Use(cors.New(cors.Config{
|
||||||
AllowOrigins: []string{"http://192.168.0.200:*"},
|
AllowOrigins: []string{"*"},
|
||||||
AllowMethods: []string{"POST", "GET", "OPTIONS"},
|
AllowMethods: []string{"POST", "GET", "OPTIONS"},
|
||||||
AllowHeaders: []string{"Content-Type", "Authorization"},
|
AllowHeaders: []string{"Content-Type", "Authorization"},
|
||||||
ExposeHeaders: []string{"Content-Length"},
|
ExposeHeaders: []string{"Content-Length"},
|
||||||
|
|
Loading…
Reference in a new issue