maingateApiToken추가

This commit is contained in:
2024-09-23 17:46:39 +09:00
parent 7ae391b599
commit 97fc64be81
2 changed files with 11 additions and 7 deletions

View File

@ -25,9 +25,10 @@ type HoustonServerWithHandler interface {
type houstonHandler struct { type houstonHandler struct {
HoustonServer HoustonServer
methods map[string]reflect.Method methods map[string]reflect.Method
deployPath string deployPath string
downloadPath string downloadPath string
maingateApiToken string
} }
func NewHoustonHandler() HoustonServerWithHandler { func NewHoustonHandler() HoustonServerWithHandler {
@ -40,8 +41,9 @@ func NewHoustonHandler() HoustonServerWithHandler {
methods[strings.ToLower(method.Name)] = method methods[strings.ToLower(method.Name)] = method
} }
return &houstonHandler{ return &houstonHandler{
HoustonServer: NewServer(), HoustonServer: NewServer(),
methods: methods, methods: methods,
maingateApiToken: loadServerConfig().MaingateApiToken,
} }
} }
@ -172,6 +174,7 @@ func (h *houstonHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
r.Body.Close() r.Body.Close()
}() }()
// TODO : 구글 인증까지 붙인 후에 주석 제거
// var userinfo map[string]any // var userinfo map[string]any
// if !*noauth && (*authtype == "on" || *authtype == "both") { // if !*noauth && (*authtype == "on" || *authtype == "both") {
// authheader := r.Header.Get("Authorization") // authheader := r.Header.Get("Authorization")

View File

@ -20,8 +20,9 @@ type HoustonServer interface {
} }
type serverConfig struct { type serverConfig struct {
GrpcPort int `json:"grpc_port"` GrpcPort int `json:"grpc_port"`
StorageRoot string `json:"storage_path"` StorageRoot string `json:"storage_path"`
MaingateApiToken string `json:"maingate_api_token"`
} }
type DeployRequest struct { type DeployRequest struct {