错误 401 - 浏览器中的 Spring Boot 执行器登录名/密码

2024-04-28

我将 Spring Boot 与执行器一起使用,并添加安全配置:

management.port=8088
management.address=127.0.0.1
management.security.enabled=true
security.user.name=admin
security.user.password=secret
management.security.role=SUPERUSER

curl -u admin:secret http://127.0.0.1:8088/metrics没问题,但使用 Chrome (http://127.0.0.1:8088/metrics http://127.0.0.1:8088/metrics): {"timestamp":1506692938036,"status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource.","path":"/metrics"}

如何在网址或标头中使用登录名/密码?

EDIT 1

我尝试@Lachezar Balev解决方案(授权:Basic YWRtaW46c2VjcmV0 + admin:secret@ in url),但被KO


在网址中:

http://admin:[email protected] /cdn-cgi/l/email-protection:8088/metrics

作为标题:

Authorization: Basic YWRtaW46c2VjcmV0
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

错误 401 - 浏览器中的 Spring Boot 执行器登录名/密码 的相关文章

随机推荐