This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
func CheckAllowed(c *gin.Context) {
|
||||
secret := c.GetHeader("X-SECRET-KEY")
|
||||
if secret != initializers.SECRET {
|
||||
if secret != initializers.SecretKey {
|
||||
c.JSON(http.StatusForbidden, gin.H{"error": "Forbidden"})
|
||||
c.Abort()
|
||||
return
|
||||
@@ -18,7 +18,7 @@ func CheckAllowed(c *gin.Context) {
|
||||
|
||||
func CheckAdmin(c *gin.Context) {
|
||||
adminSecret := c.GetHeader("X-ADMIN-KEY")
|
||||
if adminSecret != initializers.ADMIN_SECRET {
|
||||
if adminSecret != initializers.AdminSecret {
|
||||
c.JSON(http.StatusForbidden, gin.H{"error": "Forbidden"})
|
||||
c.Abort()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user