forked from baron/baron-sso
fix: 환경변수 내 큰따옴표(")로 인한 URL 파싱 에러 수정 (utils.GetEnv 도입) #239
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"baron-sso-backend/internal/utils"
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
@@ -9,7 +10,6 @@ import (
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -28,14 +28,8 @@ type ketoService struct {
|
||||
}
|
||||
|
||||
func NewKetoService() KetoService {
|
||||
readURL := os.Getenv("KETO_READ_URL")
|
||||
if readURL == "" {
|
||||
readURL = "http://keto:4466"
|
||||
}
|
||||
writeURL := os.Getenv("KETO_WRITE_URL")
|
||||
if writeURL == "" {
|
||||
writeURL = "http://keto:4467"
|
||||
}
|
||||
readURL := utils.GetEnv("KETO_READ_URL", "http://keto:4466")
|
||||
writeURL := utils.GetEnv("KETO_WRITE_URL", "http://keto:4467")
|
||||
|
||||
return &ketoService{
|
||||
readURL: readURL,
|
||||
|
||||
Reference in New Issue
Block a user