@Override public LoginIdentityContext getResponse(Properties properties) { String contextPath = ContextPathUtil.normalizeContextPath( properties.getProperty(PropertyKeyConst.CONTEXT_PATH, DEFAULT_NACOS_WEB_CONTEXT)); String server = properties.getProperty(NacosAuthLoginConstant.SERVER, StringUtils.EMPTY); if (!server.startsWith(HTTPS_PREFIX) && !server.startsWith(HTTP_PREFIX)) { if (!InternetAddressUtil.containsPort(server)) { server = server + InternetAddressUtil.IP_PORT_SPLITER + ClientBasicParamUtil.getDefaultServerPort(); } **server = HTTP_PREFIX + server;** } server = HTTP_PREFIX + server; 这一行server 的协议头 能否通过配置动态拼接,当前是写死的http
Activity
Melod-YI commentedon Dec 17, 2025
这个判断条件里不是有一条HTTPS_PREFIX的检查么,改下server的配置为https开头就好了吧
joydaliu commentedon Dec 18, 2025
server = HTTP_PREFIX + server; 这个地方是写死的,server的配置是nacos://xxxx
Melod-YI commentedon Dec 18, 2025
你这个配法是dubbo吗?
感觉上这是个dubbo的问题,似乎他的配置层面就不支持这种格式,可以先询问下dubbo社区对于注册中心开启tls的配置方式是什么。
KomachiSion commentedon Dec 18, 2025
可以优化一下, 如果入参中的地址没有带有http或者https的信息, 可以从其他的参数,比如defaultSchema之类的参数中获取一下,若再没有, 再默认使用http
这样dubbo就不需要修改了。 其他框架可能也能支持。
KomachiSion commentedon Dec 18, 2025
issue中可以讨论一下这个参数命名,看下怎么更好的表达这个意思。
joydaliu commentedon Dec 18, 2025
Melod-YI commentedon Dec 18, 2025
HTTP client那边有一个tls.enable的参数
在dubbo社区的issue里,看到一个疑似配置命名冲突的问题。
apache/dubbo#14311
KomachiSion commentedon Dec 23, 2025
这个参数是否是grpc客户端使用的参数?
KomachiSion commentedon Dec 23, 2025
我没有找到这个参数的位置, 您看的是哪个客户端版本
joydaliu commentedon Dec 23, 2025
这个是springboot内置的配置 org.springframework.boot.web.server.autoconfigure.ServerProperties
KomachiSion commentedon Jan 7, 2026
那肯定不行啊, nacos-client怎么能依赖spring的配置呢,会循环依赖
[ISSUE #14036] Support TLS prefix for HTTP login (#15405)
[ISSUE #14036] Support TLS prefix for HTTP login (#15405)