Compare commits
No commits in common. "9d243249dea1bfd6f116c20e1df8b60ca187b035" and "03d72e59c36af4adab0d8ddc201cb2bf303f2576" have entirely different histories.
9d243249de
...
03d72e59c3
1 changed files with 9 additions and 1 deletions
|
|
@ -40,13 +40,21 @@ func getCORSConfig(env string) cors.Config {
|
|||
}
|
||||
case "prod":
|
||||
return cors.Config{
|
||||
AllowOrigins: []string{"https://ocboapps.davaocity.gov.ph", "https://esign.patalcala.com", "http://localhost:8080", "http://127.0.0.1:8080"},
|
||||
AllowOrigins: []string{"https://ocboapps.davaocity.gov.ph", "https://esign.patalcala.com"},
|
||||
AllowMethods: []string{"GET", "POST", "OPTIONS", "DELETE"},
|
||||
// AllowHeaders: []string{"Origin", "OCBO-Token", "Content-Length", "Content-Type", "X-Server", "Authorization"},
|
||||
AllowHeaders: []string{"*"},
|
||||
ExposeHeaders: []string{"Content-Length"},
|
||||
AllowCredentials: true,
|
||||
}
|
||||
case "lan":
|
||||
return cors.Config{
|
||||
AllowOrigins: []string{"*"},
|
||||
AllowMethods: []string{"GET", "POST", "OPTIONS", "DELETE"},
|
||||
AllowHeaders: []string{"*"},
|
||||
ExposeHeaders: []string{"Content-Length"},
|
||||
AllowCredentials: true,
|
||||
}
|
||||
default:
|
||||
return cors.DefaultConfig()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue