diff --git a/js_export.go b/js_export.go index eab912d..0a5c40e 100644 --- a/js_export.go +++ b/js_export.go @@ -32,7 +32,7 @@ func init() { } else { // 2. 远程数据库前缀校验 var allowedDSNs []string - cast.Convert(&allowedDSNs, ctx.Value("AllowedDSNs")) + cast.Convert(&allowedDSNs, jsmod.Get(ctx, "AllowedDSNs")) matched := false for _, prefix := range allowedDSNs { if strings.HasPrefix(name, prefix) {