fix: update discord link

fix: redirect link for verification handler (#74)

Resolves #70
This commit is contained in:
Lakhan Samani
2021-12-07 17:50:50 +05:30
parent 6ca37a0d50
commit cb5b02d777
8 changed files with 14 additions and 15 deletions

View File

@@ -32,6 +32,8 @@ func GinContextToContextMiddleware() gin.HandlerFunc {
func CORSMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
origin := c.Request.Header.Get("Origin")
constants.APP_URL = origin
log.Println("=> APP_URL:", constants.APP_URL)
c.Writer.Header().Set("Access-Control-Allow-Origin", origin)
c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")
c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With")