중복 로그인 방지

This commit is contained in:
2024-04-22 17:58:53 +09:00
parent f8557078cc
commit ba19cc0006
4 changed files with 26 additions and 3 deletions

View File

@ -74,6 +74,7 @@ func SessionTTL() time.Duration {
type maingateConfig struct {
session.SessionConfig `json:",inline"`
MustUseChecksum bool `json:"maingate_must_checksum"`
Mongo string `json:"maingate_mongodb_url"`
Autologin_ttl int64 `json:"autologin_ttl"`
MaximumNumLinkAccount int64 `json:"maximum_num_link_account"`
@ -407,6 +408,7 @@ func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMu
if len(allServices) > 0 {
only := allServices[0]
only.prepare(mg)
only.mustUseChecksum = config.MustUseChecksum
atomic.StorePointer(&mg.serviceptr, unsafe.Pointer(only))
} else {