diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-05-06 12:44:03 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-05-06 12:44:03 +0300 |
| commit | 0d2b629db334af6d310f324ba2da9716222003b3 (patch) | |
| tree | a850e01bdb0430eec80d2c5cca62117dadbd9b1c /main.go | |
| parent | test: disable cors (diff) | |
| download | lphub-0d2b629db334af6d310f324ba2da9716222003b3.tar.gz lphub-0d2b629db334af6d310f324ba2da9716222003b3.tar.bz2 lphub-0d2b629db334af6d310f324ba2da9716222003b3.zip | |
fix: allow credentials cors
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -33,6 +33,7 @@ func main() { | |||
| 33 | router := gin.Default() | 33 | router := gin.Default() |
| 34 | config := cors.DefaultConfig() | 34 | config := cors.DefaultConfig() |
| 35 | config.AllowAllOrigins = true | 35 | config.AllowAllOrigins = true |
| 36 | config.AllowCredentials = true | ||
| 36 | router.Use(cors.New(config)) | 37 | router.Use(cors.New(config)) |
| 37 | database.ConnectDB() | 38 | database.ConnectDB() |
| 38 | // For frontend static serving - only for local debug | 39 | // For frontend static serving - only for local debug |